<feed xmlns='http://www.w3.org/2005/Atom'>
<title>lectio.git/mobile/mobile.go, branch perf/hoist-date-independent-work</title>
<subtitle>offline Catholic daily readings and liturgical calendar in Go, with CLI, TUI and web clients</subtitle>
<id>https://git.labunix.xyz/lectio.git/atom?h=perf%2Fhoist-date-independent-work</id>
<link rel='self' href='https://git.labunix.xyz/lectio.git/atom?h=perf%2Fhoist-date-independent-work'/>
<link rel='alternate' type='text/html' href='https://git.labunix.xyz/lectio.git/'/>
<updated>2026-08-24T14:35:01Z</updated>
<entry>
<title>perf(readings): stack calendar layers and load the book table once per Days call</title>
<updated>2026-08-24T14:35:01Z</updated>
<author>
<name>Lukasz Kasprzak</name>
<email>lukas@labunix.xyz</email>
</author>
<published>2026-08-24T14:35:01Z</published>
<link rel='alternate' type='text/html' href='https://git.labunix.xyz/lectio.git/commit/?id=b6ee8f09ad2c0bc9e83394e2427de861eb1e2a72'/>
<id>urn:sha1:b6ee8f09ad2c0bc9e83394e2427de861eb1e2a72</id>
<content type='text'>
mobile.Days (dlectio's 7-day calendar view) called readings.Load once per
date. Load's offlineLoad re-ran caldata.Stack (parses the embedded
calendar INI, plus any user calendar layer) and bible.LoadBookTable
(parses the embedded books.ini, plus any user override) on every call,
even though neither depends on the date -- only on cfg.Selection().Form
and cfg.Use, which mobile.Days holds fixed across its whole loop.

Verified before changing anything: isolated benchmarks put Stack+
LoadBookTable at ~1.1ms/call (OF) and ~1.6ms/call (EF) -- real INI
parsing and, for a user override, file I/O -- and for the OF form that
redundant work was ~67% of a 7-day view's total time.

Load gains a Prepared value (the layer stack + book table) and a
Prepare/LoadWith pair: Prepare builds a Prepared once, LoadWith reuses
it across dates. Load itself is unchanged, still calling Prepare on
every invocation -- every existing caller keeps its current behaviour
untouched. mobile.Days now Prepares once and loops LoadWith; mobile.Day
picks up the same fix for its own two same-cfg Load calls.

Benchmarked (interleaved before/after pairs, to control for machine
thermal drift): the OF 7-day view (BenchmarkDaysWeek) drops from
~11.5ms to ~6.4ms/op (allocs 53359 -&gt; 16347, -69%), an EF 7-day view
(BenchmarkDays7EF) from ~74ms to ~66-73ms/op (allocs 299204 -&gt; 253815,
-15%; the EF form's per-day calendar computation dominates its total
cost far more than OF's does, so the fix's share of the win is smaller
there), and a single Day call (BenchmarkDay1) from ~4.3ms to ~2.9ms/op
(allocs 15357 -&gt; 9192, -40%).

Output identity verified separately (not part of this diff): a 288-case
sweep of mobile.Day/mobile.Days across both forms, both UI languages,
all four corpora, a leap day, the Sacred Triduum, a Requiem day, and
windows spanning Christmas/Pentecost/Assumption/All Souls produced
byte-identical (SHA-256-equal) JSON before and after this change.

New TestLoadWithAgreesWithLoad asserts LoadWith(Prepare(cfg), cfg, opts)
equals Load(cfg, opts) for every case, so the fast path cannot silently
drift from the slow one. go test ./... and make ci (both build tags,
oracle/differential suite included) are green.
</content>
</entry>
<entry>
<title>mobile: fix the documented gomobile bind command so it reproduces the shipped .aar</title>
<updated>2026-08-05T12:12:13Z</updated>
<author>
<name>Lukasz Kasprzak</name>
<email>lukas@labunix.xyz</email>
</author>
<published>2026-08-05T12:12:13Z</published>
<link rel='alternate' type='text/html' href='https://git.labunix.xyz/lectio.git/commit/?id=8929ab96ad44b707bafd7dfe6f1f7773843c8e85'/>
<id>urn:sha1:8929ab96ad44b707bafd7dfe6f1f7773843c8e85</id>
<content type='text'>
The comment omitted -javapkg, the second -target ABI and -androidapi. A
clean clone following it got a .aar whose classes sit under
go.mobile.gojni instead of xyz.labunix.dlectio.engine.mobile, carries only
arm64-v8a, and declares no minSdkVersion match to the app's 26 -- the app
cannot import the result. Verified by rebuilding the binding with the
corrected command and confirming the artifact's ABIs, package and
minSdkVersion against the shipped one.
</content>
</entry>
<entry>
<title>mobile: strengthen the PartLabels fallback test and count bounds</title>
<updated>2026-08-03T22:11:23Z</updated>
<author>
<name>Lukasz Kasprzak</name>
<email>lukas@labunix.xyz</email>
</author>
<published>2026-08-03T22:11:23Z</published>
<link rel='alternate' type='text/html' href='https://git.labunix.xyz/lectio.git/commit/?id=197ce6980daa1c3773eed1548f54861d616d35e4'/>
<id>urn:sha1:197ce6980daa1c3773eed1548f54861d616d35e4</id>
<content type='text'>
</content>
</entry>
<entry>
<title>mobile: add PartLabels so the app stops hardcoding part IDs</title>
<updated>2026-08-03T21:59:50Z</updated>
<author>
<name>Lukasz Kasprzak</name>
<email>lukas@labunix.xyz</email>
</author>
<published>2026-08-03T21:59:50Z</published>
<link rel='alternate' type='text/html' href='https://git.labunix.xyz/lectio.git/commit/?id=1106568c52265ea3076b9d3f1943c052c83a2a89'/>
<id>urn:sha1:1106568c52265ea3076b9d3f1943c052c83a2a89</id>
<content type='text'>
</content>
</entry>
<entry>
<title>mobile: add Days, a text-free week projection for the calendar</title>
<updated>2026-08-03T21:59:09Z</updated>
<author>
<name>Lukasz Kasprzak</name>
<email>lukas@labunix.xyz</email>
</author>
<published>2026-08-03T21:59:09Z</published>
<link rel='alternate' type='text/html' href='https://git.labunix.xyz/lectio.git/commit/?id=27ceffcb90c0716179342109163c559d492a8abc'/>
<id>urn:sha1:27ceffcb90c0716179342109163c559d492a8abc</id>
<content type='text'>
A week through Days benchmarks at ~9-10ms/op, versus ~23ms for seven
full days through Day.
</content>
</entry>
<entry>
<title>mobile: return the day's rank and its localised label</title>
<updated>2026-08-03T21:56:14Z</updated>
<author>
<name>Lukasz Kasprzak</name>
<email>lukas@labunix.xyz</email>
</author>
<published>2026-08-03T21:56:14Z</published>
<link rel='alternate' type='text/html' href='https://git.labunix.xyz/lectio.git/commit/?id=13d5e99ab90ab872c8cc072a0246348f0d24fa9a'/>
<id>urn:sha1:13d5e99ab90ab872c8cc072a0246348f0d24fa9a</id>
<content type='text'>
</content>
</entry>
<entry>
<title>baseline: track the gomobile engine facade as-is</title>
<updated>2026-08-03T21:30:12Z</updated>
<author>
<name>Lukasz Kasprzak</name>
<email>lukas@labunix.xyz</email>
</author>
<published>2026-08-03T21:30:12Z</published>
<link rel='alternate' type='text/html' href='https://git.labunix.xyz/lectio.git/commit/?id=d45d0b4e4534253d782cc6312d7edda43cca196d'/>
<id>urn:sha1:d45d0b4e4534253d782cc6312d7edda43cca196d</id>
<content type='text'>
mobile/mobile.go and its go.mod/go.sum additions were sitting untracked in
the working tree. Recorded here unchanged so the work that follows has a
diff baseline; no lines of it are modified by this commit.

Also ignore the cmd/dlectio-gen build product and the SDD scratch dir.
</content>
</entry>
</feed>
