[GH-ISSUE #114] Building index on larger collection #65

Closed
opened 2026-05-23 08:28:49 -06:00 by gitea-mirror · 2 comments
Owner

Originally created by @donl on GitHub (Jun 2, 2022).
Original GitHub issue: https://github.com/appy-one/acebase/issues/114

Originally assigned to: @appy-one on GitHub.

I'm having issues building indexes with larger collections (10k items) with a single Date field.

Error building index /item//at: Maximum call stack size exceeded
[idx-test] Index build on "/item/
/at" failed: Maximum call stack size exceeded (code: undefined)
/ace-server-test/node_modules/acebase/src/data-index.js:3801
const recursiveSort = (start, end) => {
^

RangeError: Maximum call stack size exceeded
at recursiveSort (/ace-server-test/node_modules/acebase/src/data-index.js:3801:25)

Originally created by @donl on GitHub (Jun 2, 2022). Original GitHub issue: https://github.com/appy-one/acebase/issues/114 Originally assigned to: @appy-one on GitHub. I'm having issues building indexes with larger collections (10k items) with a single Date field. Error building index /item/*/at: Maximum call stack size exceeded [idx-test] Index build on "/item/*/at" failed: Maximum call stack size exceeded (code: undefined) /ace-server-test/node_modules/acebase/src/data-index.js:3801 const recursiveSort = (start, end) => { ^ RangeError: Maximum call stack size exceeded at recursiveSort (/ace-server-test/node_modules/acebase/src/data-index.js:3801:25)
gitea-mirror 2026-05-23 08:28:49 -06:00
  • closed this issue
  • added the
    bug
    label
Author
Owner

@appy-one commented on GitHub (Jun 3, 2022):

I managed to reproduce this and am on it. Thanks for reporting!

<!-- gh-comment-id:1146259672 --> @appy-one commented on GitHub (Jun 3, 2022): I managed to reproduce this and am on it. Thanks for reporting!
Author
Owner

@appy-one commented on GitHub (Jun 6, 2022):

I fixed this by replacing the used quicksort algorithm with a faster variant that uses stacks instead of recursion (which was causing the stack overflow). I've published the changes in v1.21.2. Thanks again for reporting this, let me know if it works!

Also, many many thanks for sponsoring! You rock!!

<!-- gh-comment-id:1147364372 --> @appy-one commented on GitHub (Jun 6, 2022): I fixed this by replacing the used quicksort algorithm with a faster variant that uses stacks instead of recursion (which was causing the stack overflow). I've published the changes in v1.21.2. Thanks again for reporting this, let me know if it works! Also, **many many** thanks for sponsoring! You rock!!
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference: github-starred/acebase#65
No description provided.