|
core, webclient: cheap session lists, changed-row saves, smaller bundle
The sidebar asked for a count and a 60-char snippet and got every hot message of every listed session: 2,097 rows / 4.4 MB for 507 sessions, plus a full Pydantic hydration. list_page now aggregates counts and the last displayed line in SQL (4.0 ms, 30 rows); get_meta folds its COUNT into the same round trip. save() runs after every streaming step and rewrote the whole hot history each time — 1,016 UPDATEs, 46.8 ms, per call, growing with the session. A fingerprint of the mutable columns lets it touch only the rows that changed, which is normally the tail. HTTP: content-hashed /assets are immutable for a year, gzip drops to level 6 (same ratio within a couple of percent on JSON, half the CPU), and session search gets pg_trgm GIN indexes when the extension exists. Client: one shared highlight.js on lib/common plus the languages we actually render (openscad included) instead of the full ~190-language entry point, and the unused @tanstack/vue-virtual is gone. Bundle 1566 -> 760 kB (gzip 495 -> 238 kB). |
|---|
|
|
| navi/api/routes/sessions/listing.py |
|---|
| navi/core/session.py |
|---|
| navi/core/sessions/ddl.py |
|---|
| navi/core/sessions/rows.py |
|---|
| navi/core/sessions/store.py |
|---|
| navi/main.py |
|---|
| tests/unit/api/test_gzip.py |
|---|
| tests/unit/core/test_pg_session_store.py |
|---|
| webclient/dist/assets/index-Ceizh7DK.js 0 → 100644 |
|---|
| webclient/dist/assets/index-D-jo88O-.js 100644 → 0 |
|---|
|
Not supported
|
| webclient/dist/index.html |
|---|
| webclient/dist/sw.js |
|---|
| webclient/package-lock.json |
|---|
| webclient/package.json |
|---|
| webclient/src/composables/useMarkdown.js |
|---|
| webclient/src/utils/highlight.js 0 → 100644 |
|---|
| webclient/src/utils/sourceHighlight.js |
|---|