-
-
Notifications
You must be signed in to change notification settings - Fork 7.4k
parse json OOM #4514
Copy link
Copy link
Closed as not planned
Labels
kind: bugstate: needs more infothe author of the issue needs to provide more detailsthe author of the issue needs to provide more detailsstate: stalethe issue has not been updated in a while and will be closed automatically soon unless it is updatedthe issue has not been updated in a while and will be closed automatically soon unless it is updated
Metadata
Metadata
Assignees
Labels
kind: bugstate: needs more infothe author of the issue needs to provide more detailsthe author of the issue needs to provide more detailsstate: stalethe issue has not been updated in a while and will be closed automatically soon unless it is updatedthe issue has not been updated in a while and will be closed automatically soon unless it is updated

Description
I have a string, which is about 10MB in memory. However, when I use json::parse(), the memory cost is 1.6GB.
I wonder if it's a bug?
Reproduction steps
A long string with chinese charater encoded with utf-8.
call
json j = json::parse(str);
can trigger this bug.
Expected vs. actual results
lower memory cost.
Minimal code example
No response
Error messages
No response
Compiler and operating system
windows
Library version
branch: develop, commit hash: ee32bfc
Validation
developbranch is used.