perf(db): the calendar export, the journey reads and the stop reorders read and write in batches

The ICS export reads the stops and notes of all dated days in two statements instead of two per day, the journey's full read and entry list take the source trip titles in one join instead of one read per entry, and reordering a day's stops or sorting it by time writes every position in one CASE update. Results are unchanged: each day keeps its order (the id settles a tie), a missing trip still names null, and an id listed twice keeps its last position.
This commit is contained in:
Maurice
2026-10-10 12:37:51 +02:00
parent 4a3c97e500
commit e316ccf3bb
11 changed files with 163 additions and 61 deletions
+2 -2
View File
@@ -2,7 +2,7 @@
"scripts/db-call-graph.mjs": 1036,
"scripts/generate-entities.ts": 2259,
"src/db/repositories/Places.repository.ts": 1440,
"src/db/repositories/Reservations.repository.ts": 1676,
"src/db/repositories/Reservations.repository.ts": 1675,
"src/db/repositories/Trips.repository.ts": 1121,
"src/db/repositories/Users.repository.ts": 1710,
"src/nest/atlas/atlas-geo.ts": 1005,
@@ -12,7 +12,7 @@
"src/nest/collections/collections.service.ts": 1488,
"src/nest/doc-sync/doc-sync.service.ts": 1060,
"src/nest/doc-sync/providers/synology-drive.client.ts": 1160,
"src/nest/journey/journey-domain.service.ts": 1804,
"src/nest/journey/journey-domain.service.ts": 1799,
"src/nest/maps/maps.service.ts": 3252,
"src/nest/places/places.service.ts": 2020,
"src/nest/plugins/plugin-runtime.service.ts": 1463,