<feed xmlns='http://www.w3.org/2005/Atom'>
<title>lectio.git/internal/readings/readings.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>refactor: remove the niedziela/missalemeum scrapers, bt, traditional_lang</title>
<updated>2026-07-28T10:50:31Z</updated>
<author>
<name>Lukasz Kasprzak</name>
<email>lukas@labunix.xyz</email>
</author>
<published>2026-07-28T10:50:31Z</published>
<link rel='alternate' type='text/html' href='https://git.labunix.xyz/lectio.git/commit/?id=7b220084cf3951c8cde0582efdfcf628afc64336'/>
<id>urn:sha1:7b220084cf3951c8cde0582efdfcf628afc64336</id>
<content type='text'>
The daily view now computes entirely offline (previous commit), so retire the
network path and everything that served it:

- Delete internal/tradlit (missalemeum) and the niedziela scraper from
  internal/liturgy (fetch/store/parse + fixtures); keep Section, DayInfo and
  ExtractCitation.
- Remove the "bt" version everywhere (render gatherBT + branches, config,
  i18n, web form, TUI) and bible.ToEnglishRef (Polish citation converter).
  A legacy config carrying "bt" migrates to "wuj" on load (config.migrateBT).
- Remove the traditional_lang config field and the -g/--lang flag from all
  three binaries.
- Drop the now-dead flags -R/--refresh, -o/--offline, -u/--update,
  -C/--clean and the harvest/clean commands.
- New defaults: versions = wuj,vul,grb,drb; default_version = vul.

Update the README (offline-by-design, no harvest/update), help text, and
stale niedziela/bt doc comments. Tests updated for the offline reality;
go test ./... and go vet ./... are clean, all three binaries build and run
offline (OF + EF, compare, web).
</content>
</entry>
<entry>
<title>feat(readings): compute the daily view offline (OF + EF)</title>
<updated>2026-07-28T09:57:45Z</updated>
<author>
<name>Lukasz Kasprzak</name>
<email>lukas@labunix.xyz</email>
</author>
<published>2026-07-28T09:57:45Z</published>
<link rel='alternate' type='text/html' href='https://git.labunix.xyz/lectio.git/commit/?id=feede51697be870ae183a95b513ef64f031dbd0f'/>
<id>urn:sha1:feede51697be870ae183a95b513ef64f031dbd0f</id>
<content type='text'>
Route readings.Load through the embedded calendar engine and lectionary
data instead of the niedziela/missalemeum scrapers. The daily view now
computes each day (calendar.Compute + caldata.Readings) and renders text
from the public-domain corpora, with citations resolved per corpus.

- bible.OFRef: normalise an English-canonical OF citation (drop sub-verse
  letters, ";" -&gt; ",") and renumber Psalms for the target Psalter
  (Hebrew-&gt;Vulgate chapter for vul/grb/wuj; DRB title-fold verses for drb).
- liturgy.Section gains Ref (English-canonical lookup ref) alongside
  Citation (sigla-dialect display); the loader fills both, resolveRef uses
  Ref, headings/citation command show Citation.
- EffectiveVersions always drops "bt" (no offline corpus); the single
  daily version defaults to vernacularVersion (reading corpus else Latin).

Scraper packages remain in the tree, unreferenced, pending removal.
</content>
</entry>
<entry>
<title>export: month calendar PDF (A4 landscape, Monday-first grid, feast name + gospel ref + liturgical colour per day); cli --calendar YYYY-MM; web /calendar + link; readings.GospelCitation; v0.23.0</title>
<updated>2026-07-24T14:56:07Z</updated>
<author>
<name>Lukasz Kasprzak</name>
<email>lukas@labunix.xyz</email>
</author>
<published>2026-07-24T14:56:07Z</published>
<link rel='alternate' type='text/html' href='https://git.labunix.xyz/lectio.git/commit/?id=378926240f34759116b19e078d2b2504965f5329'/>
<id>urn:sha1:378926240f34759116b19e078d2b2504965f5329</id>
<content type='text'>
</content>
</entry>
<entry>
<title>dayinfo: show feast/day name + colour (modern niedziela + traditional missalemeum) in cli/tui/web; v0.5.0</title>
<updated>2026-07-24T08:32:28Z</updated>
<author>
<name>Lukasz Kasprzak</name>
<email>lukas@labunix.xyz</email>
</author>
<published>2026-07-24T08:32:28Z</published>
<link rel='alternate' type='text/html' href='https://git.labunix.xyz/lectio.git/commit/?id=c9f3bf46f0de09edb796e35f3dcff349febf75c9'/>
<id>urn:sha1:c9f3bf46f0de09edb796e35f3dcff349febf75c9</id>
<content type='text'>
</content>
</entry>
<entry>
<title>tradlit: offline caching + read; update pre-caches traditional; --clean prunes it; v0.2.0</title>
<updated>2026-07-24T07:15:40Z</updated>
<author>
<name>Lukasz Kasprzak</name>
<email>lukas@labunix.xyz</email>
</author>
<published>2026-07-24T07:15:40Z</published>
<link rel='alternate' type='text/html' href='https://git.labunix.xyz/lectio.git/commit/?id=b93de95dd24ff2a1d3126e6d7d00cd77530a03bf'/>
<id>urn:sha1:b93de95dd24ff2a1d3126e6d7d00cd77530a03bf</id>
<content type='text'>
</content>
</entry>
<entry>
<title>web: theme control boxes, one default version, drop search bar; traditional drops pl + all=readings-only</title>
<updated>2026-07-23T18:46:17Z</updated>
<author>
<name>Lukasz Kasprzak</name>
<email>lukas@labunix.xyz</email>
</author>
<published>2026-07-23T18:46:17Z</published>
<link rel='alternate' type='text/html' href='https://git.labunix.xyz/lectio.git/commit/?id=0b47572bc0addc5f59ebac3e70278ea435097565'/>
<id>urn:sha1:0b47572bc0addc5f59ebac3e70278ea435097565</id>
<content type='text'>
</content>
</entry>
<entry>
<title>readings: lectionary router + part filtering</title>
<updated>2026-07-23T11:28:38Z</updated>
<author>
<name>Lukasz Kasprzak</name>
<email>lukas@labunix.xyz</email>
</author>
<published>2026-07-23T11:28:38Z</published>
<link rel='alternate' type='text/html' href='https://git.labunix.xyz/lectio.git/commit/?id=0351f4f188207d0204e1e0124d32127e820e33d5'/>
<id>urn:sha1:0351f4f188207d0204e1e0124d32127e820e33d5</id>
<content type='text'>
</content>
</entry>
</feed>
