-
Notifications
You must be signed in to change notification settings - Fork 115
Closed
Description
Description
When parsing YAML without line breaks and with many scalars, then the parser becomes arbitrary slow. Often JSON has such a format.
The cause of the issue seems to be this line of code. I don't understand the purpose of the check, but it causes the scanning of the whole line, if the line contains no \r
-character, i.e. the complexity to scan the line becomes #scalars x #characters
. Removing the check (for testing) fixes the performance issue for my test case. The same check appears in other functions, too, i.e. those functions will be affected, too.
It seems to be a mistake that the scan starts outside of the scalar at the end of the line because the filtering is applied to the scalar only.
Metadata
Metadata
Assignees
Labels
No labels