Skip to content

Review IndexedDB workload DB synchronization boundaries #53

@issackjohn

Description

@issackjohn

Follow-up from WebKit#531 review.

Review context:

Current state:

  • experimental/javascript-wc-indexeddb/src/workload-test.mjs splits DB completion into ignored follow-up steps:
    • FinishAddingItemsToDB waits for db-add-completed.
    • FinishModifyingItemsInDB waits for db-toggle-completed.
    • FinishDeletingItemsFromDB waits for db-delete-completed.
  • The storage layer dispatches those events from src/storage/base-storage-manager.js after all expected DB operations for that phase complete.
  • DeletingAllItems also pages backward via previous-page-loaded, which is currently a UI/page-load synchronization signal, not a DB synchronization signal.

Open question from review:

  • Are delete/read/page phases synchronized enough to compare performance reliably across browsers and storage backends?
  • In particular, deleting visible items and then paging/readback may need clearer DB synchronization boundaries if reads are involved in loading the previous page.

Research notes:

  • TodoApp.moveToPreviousPage() awaits this.list.moveToPreviousPage() before dispatching previous-page-loaded.
  • The benchmark separately waits for db-delete-completed only after all delete/page iterations finish.
  • Need to verify whether each page transition reads from IndexedDB and whether those reads are included in the intended measured phase.

Suggested direction:

  • Trace todo-list.moveToPreviousPage() and storage calls for IndexedDB and DexieJS.
  • Decide whether page-load/read work should be measured in DeletingAllItems or isolated in an ignored sync step.
  • If needed, add explicit per-page DB read completion events or await existing storage promises instead of relying only on previous-page-loaded.
  • Document the intended measurement boundary in workload-test.mjs so future changes keep IndexedDB and DexieJS comparable.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions