open-notebook/open_notebook/database/migrations
Luis Novo 4dc1539838
perf: improve source listing speed by 20-30x (#436)
* fix(i18n): resolve podcast dialog translation infinite loop and profile issues

- Remove incorrect translation keys for user-defined episode profiles
- Cache translation strings in ContentSelectionPanel to avoid repeated
  Proxy accesses that triggered infinite loop detection
- Stabilize useEffect dependencies with dataKey pattern to prevent
  re-initialization on every keystroke
- Replace unstable sourcesQueries prop with stable fetchingNotebookIds set
- Clean up unused getSourceModes function and TranslationKeys import

* chore: bump lock

* chore: bump version to 1.5.1 and update CHANGELOG

* fix: guard .join() call in dataKey when query data is undefined

* fix(api): use FETCH command instead of async status lookups for sources list

Replace N async calls to surreal-commands with SurrealDB FETCH clause
to resolve command status in a single query. This eliminates the
command status cascade bottleneck.

* perf(db): add indexes on source field for insights and embeddings

Add migration #10 that creates indexes on the `source` field of
`source_insight` and `source_embedding` tables. These indexes
dramatically improve the performance of source listing queries
that use subqueries to count insights and check embedding existence.

Performance improvement: ~8.5s -> ~0.3s for 30 sources (28x faster)

* perf(db): make index concurrent

* fix: add IF NOT EXISTS to index definitions for idempotency

* fix: address code review feedback

- Add IF EXISTS to rollback migration for safer rollbacks
- Add fallback for unresolved command references (status = "unknown")
2026-01-15 22:29:20 -03:00
..
1.surrealql refactor: reorganize folder structure for better maintainability 2026-01-03 14:04:27 -03:00
1_down.surrealql refactor: reorganize folder structure for better maintainability 2026-01-03 14:04:27 -03:00
2.surrealql refactor: reorganize folder structure for better maintainability 2026-01-03 14:04:27 -03:00
2_down.surrealql refactor: reorganize folder structure for better maintainability 2026-01-03 14:04:27 -03:00
3.surrealql refactor: reorganize folder structure for better maintainability 2026-01-03 14:04:27 -03:00
3_down.surrealql refactor: reorganize folder structure for better maintainability 2026-01-03 14:04:27 -03:00
4.surrealql refactor: reorganize folder structure for better maintainability 2026-01-03 14:04:27 -03:00
4_down.surrealql refactor: reorganize folder structure for better maintainability 2026-01-03 14:04:27 -03:00
5.surrealql refactor: reorganize folder structure for better maintainability 2026-01-03 14:04:27 -03:00
5_down.surrealql refactor: reorganize folder structure for better maintainability 2026-01-03 14:04:27 -03:00
6.surrealql refactor: reorganize folder structure for better maintainability 2026-01-03 14:04:27 -03:00
6_down.surrealql refactor: reorganize folder structure for better maintainability 2026-01-03 14:04:27 -03:00
7.surrealql refactor: reorganize folder structure for better maintainability 2026-01-03 14:04:27 -03:00
7_down.surrealql refactor: reorganize folder structure for better maintainability 2026-01-03 14:04:27 -03:00
8.surrealql refactor: reorganize folder structure for better maintainability 2026-01-03 14:04:27 -03:00
8_down.surrealql refactor: reorganize folder structure for better maintainability 2026-01-03 14:04:27 -03:00
9.surrealql refactor: reorganize folder structure for better maintainability 2026-01-03 14:04:27 -03:00
9_down.surrealql refactor: reorganize folder structure for better maintainability 2026-01-03 14:04:27 -03:00
10.surrealql perf: improve source listing speed by 20-30x (#436) 2026-01-15 22:29:20 -03:00
10_down.surrealql perf: improve source listing speed by 20-30x (#436) 2026-01-15 22:29:20 -03:00