Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Improves performance of json_stream_parser.cc by factor 1000 #7230

Merged
merged 2 commits into from
Feb 19, 2020

Conversation

wsw2016
Copy link
Contributor

@wsw2016 wsw2016 commented Feb 18, 2020

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.

With this modification the speed is comparable with other Json parsers.

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.
Improves performance of json_stream_parser.cc by factor 1000
@acozzette
Copy link
Member

Thanks, @wsw2016!

@yoavmil
Copy link
Contributor

yoavmil commented May 8, 2020

In which release is this fix included?

@arhuaco
Copy link

arhuaco commented May 9, 2020

In which release is this fix included?

v3.12.0-rc1

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants