Skip to content

improve performance of json load #5054

@yangzhg

Description

@yangzhg

There are two points that affect performance in the current json load:
1 json is actually a traversal operation for searching by key. We call HasMember and operator[] twice, and need to traverse twice
2 If you use a string as the key to find the json object, strlen will be called every time, so the number of calls to strlen is the row number * column number

we have two way to improve this:
1 use FindMember instead of HasMember + []
2 add a flag of fuzzy_parse, if the json file all object keys are the same and has same order, we only need to parse the first row, and then use index instead key to parse value

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