These changes are a speedup, mostly from not repeating sorting on every child of a nested document.
Analyzing 10000 documents from the listings fixture from compass-e2e-tests: 270 ms before, 113 ms after
Questions/Notes for reviewers:
[x] Should we update the snake_case variable names in the schema output to camelCase? It would make these changes a major version, which is fine. total_count, average_length, and has_duplicates. Yes, let's do it in a separate pr as it involves some README updates.
Most main changes are in src/schema-analyzer.ts which it looks like GitHub is minimizing by default.
We now export the various types so places like compass-schema and import-export can use them. In a follow up pr we'll move the
gather-fields
function fromcompass-import-export
here so other places can use it (like in the wizard in compass-aggregations). https://github.com/mongodb-js/compass/blob/main/packages/compass-import-export/src/export/gather-fields.tsThese changes are a speedup, mostly from not repeating sorting on every child of a nested document. Analyzing 10000 documents from the
listings
fixture fromcompass-e2e-tests
:270 ms
before,113 ms
afterQuestions/Notes for reviewers:
snake_case
variable names in the schema output tocamelCase
? It would make these changes a major version, which is fine.total_count
,average_length
, andhas_duplicates
. Yes, let's do it in a separate pr as it involves some README updates.