Skip to content

Improves performance of json_stream_parser.cc by factor 1000 - #1

Merged
wsw2016 merged 1 commit into
masterfrom
wsw2016-patch-strutils
Feb 18, 2020
Merged

wsw2016 merged 1 commit into
masterfrom
wsw2016-patch-strutils

Conversation

@wsw2016

@wsw2016 wsw2016 commented Feb 18, 2020

Copy link
Copy Markdown
Owner

JsonStreamParser::GetNextTokenType() uses HasPrefixString a lot on StringPiece as input. For each call two std::strings are constructed, compared and destroyed. Parsing of json-files with 50-60 MB in debug mode takes minutes.
Inserting a HasPrefixString on StringPiece reduces the overhead strongly.

JsonStreamParser::GetNextTokenType() uses HasPrefixString a lot on StringPiece as input. For each call two std::strings are constructed, compared and destroyed. Parsing of json-files with 50-60 MB in debug mode takes minutes.
@wsw2016
wsw2016 merged commit c221482 into master Feb 18, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant