Skip to content

Memory limit exceeded in key-value sort validation for large arrays (>2^26 elements) #14

@jayshah1819

Description

@jayshah1819

const combined = Array.from(keys).map((key, index) => ({

Issue: The validation function for key-value sorting fails with RangeError: Invalid array length when sorting arrays larger than ~67 million elements (2^26).

https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/length#:~:text=Setting%20length%20to,a%20RangeError%20exception.

Image

Works fine for 2^25 elements:

Image

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions