Skip to content

perf(mongodb): do not block document list on countDocuments #876

Description

@ZhuchkaTriplesix

Summary

MongoDocumentsView._load awaits a full count command before a bounded find (limit 25). Exact count scales with collection size / filter; first paint waits on both RTTs. Same class as SQL Table Browser COUNT(*) that #788 / #799 / #807 replaced with estimates or skip-count.

Scope

  • Paint the first page from find without waiting on exact count.
  • Use $collStats / estimated count, or “page full ⇒ maybe more” like SQLite browse.
  • Filtered counts can stay exact in the background after first paint.

Out of scope

  • Changing page size 25.
  • Unbounded find API if limit omitted (footgun; not a current UI caller).

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    backendBackend database driver execution and queriesfrontendTheme parser epic label: frontendperformanceTheme parser epic label: performance

    Type

    No type

    Projects

    No projects

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions