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
In MongoDocumentTreeView (lib/features/mongodb/mongo_document_tree_view.dart), appendJsonPath(parentPath, keyOrIndex) instantiates RegExp(r'^[a-zA-Z_$][a-zA-Z0-9_$]*$') inside the function on every single node of a document tree.
For 1,000 documents with 20 fields each, this results in 20,000 regex compilations and matcher allocations on every render.
Solution
Replace runtime RegExp construction with a zero-allocation character validation helper using codeUnitAt.
Cache or precompile static pattern if regex is retained.
Benefits
0 RegExp allocations during MongoDB tree traversal.
~15-20x faster path construction for nested documents.
Fixed on dev by 8517500: perf(mongodb): check JSON path identifiers from code units. It reaches main with the next dev to main merge (closed after checking the code and its tests).
Activity
Merge pull request #1610 from QueryaHub/issue/1525-mongo-json-path
ZhuchkaTriplesix commentedon Oct 25, 2026
Fixed on dev by 8517500: perf(mongodb): check JSON path identifiers from code units. It reaches main with the next dev to main merge (closed after checking the code and its tests).