Skip to content

Maximum call stack size exceeded on a large string, increasing the process' stack size works tho. #101

@klnvnv

Description

@klnvnv

Hey man, great lib!

The stack blows up when trying to parse() some large strings, around a million characters or so.

I didn't look into how you're parsing the html string, so I don't know exactly what the reason is - too long of a string, to many html elements, or too many levels in the tree. The files I've got are between one and two MB, ~5-6k elements, and the elements should be less than ten levels nested.

I'm on a Mac, the default stack size is 8k, when I increase the stack for the node process to 64k it works ok.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions