Add SQLite File Inspector to Sync Diagnostics Client#846
Add SQLite File Inspector to Sync Diagnostics Client#846
Conversation
…k/react-table for data handling. Improved SQL console with auto-limiting feature for query results.
…k/react-table for data handling. Improved SQL console with auto-limiting feature for query results.
…hub.com:powersync-ja/powersync-js into feat/refactor-sync-diagnostics-client-inspector
…for deferred query execution and implemented useSchemaReady hook to manage dynamic schema application before executing queries.
🦋 Changeset detectedLatest commit: c8619df The changes in this PR will be included in the next version bump. This PR includes changesets to release 1 package
Not sure what this means? Click here to learn what changesets are. Click here if you're a maintainer who wants to add another changeset to this PR |
…d data handling for sync engine stats. Improved variable naming for clarity.
stevensJourney
left a comment
There was a problem hiding this comment.
This looks very nice! I left some comments.
| try { | ||
| // Auto-limit queries without an explicit LIMIT to avoid fetching hundreds of thousands of rows | ||
| const hasLimit = /\bLIMIT\s+\d+/i.test(sql); | ||
| const effectiveSql = hasLimit ? sql : `${sql.replace(/;\s*$/, '')} LIMIT ${MAX_RESULT_ROWS + 1}`; |
There was a problem hiding this comment.
The PR description mentions
auto-LIMIT to prevent UI freezes on large result sets
It looks like the results are displayed in a paged table with a configurable Rows per page. Is it just the fact that having >10_000 rows in memory makes the app slow, or is the table rendering widgets for all items (even those not visible)?
There was a problem hiding this comment.
The 10k limit is mainly about memory, holding that many row objects in state slows the app down. Sorting also becomes very compute-heavy with too many rows, since TanStack Table re-sorts the entire dataset on every sort change.
…hub.com:powersync-ja/powersync-js into feat/refactor-sync-diagnostics-client-inspector
…ity and maintainability of sync diagnostics logic.
…ggest performing Compact or Defragment operations for improvement.
|
Created new PR here: #854 |
wa-sqlite MemoryAsyncVFS)@/lib/utils