You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
[P1][perf] fetchSnapshot issues N+1 IPC calls per table — slow on large schemas #373
src/components/compare/SchemaCompare.tsx:97-114 issues api.getColumns + api.getIndexes separately per table per side — 2 IPC round-trips per table per side. With 200 tables per side, that's 800 IPC calls. ARCHITECTURE §8 performance budget forbids N+1; this is the textbook violation. The schema inspector has get_table_ddl (commands/mod.rs:279) that returns the full DDL in one call.
Files
src/components/compare/SchemaCompare.tsx:97-114
Repro
Compare two databases with 200 tables each. The Compare button takes 8+ seconds to complete.
Expected
Compare completes in < 1s wall-time.
Proposed fix
Add a get_table_full_metadata(connection_id, database, table) -> TableFullMetadata { columns, indexes, foreign_keys, options, comment } Tauri command in mas-core/src/schema/inspector.rs. Frontend calls it once per table. Scope: M.
Acceptance
A schema with 100 tables fetches in < 1s wall-time (from 4s+). Backend test asserts the new command returns the same data as 3 separate calls (columns + indexes + FKs).
Schema compare could not back the claim it made — foreign keys were absent from the snapshot entirely, DDL was compared after lowercasing and collapsing whitespace, and column order was ignored — while the sync half could leave a target half-migrated. A compare tool that is quietly wrong is worse than none, because people act on its answer.
Fixing that properly is a real piece of work, most of it a genuine DDL comparison rather than string normalisation, and the feature is not part of how this project is used. Removed rather than carried: the history has it if someone wants it back.
Removed in the PR closing this issue: SchemaCompare, SyncPreview, schema-diff, sync-sql-generator, their tests, the compare editor tab type, and the menu, title-bar and toolbar entry points.
Activity
EVWorth commentedon Sep 9, 2026
Closed by removing the feature.
Schema compare could not back the claim it made — foreign keys were absent from the snapshot entirely, DDL was compared after lowercasing and collapsing whitespace, and column order was ignored — while the sync half could leave a target half-migrated. A compare tool that is quietly wrong is worse than none, because people act on its answer.
Fixing that properly is a real piece of work, most of it a genuine DDL comparison rather than string normalisation, and the feature is not part of how this project is used. Removed rather than carried: the history has it if someone wants it back.
Removed in the PR closing this issue: SchemaCompare, SyncPreview, schema-diff, sync-sql-generator, their tests, the
compareeditor tab type, and the menu, title-bar and toolbar entry points.feat: remove schema compare (#577)