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

Benchmarks #37

Open
derekperkins opened this issue Nov 8, 2016 · 8 comments
Open

Benchmarks #37

derekperkins opened this issue Nov 8, 2016 · 8 comments

Comments

@derekperkins
Copy link

In #26, it shows that each op takes ~26ms. Is that still accurate?

@derekperkins
Copy link
Author

Also, it'd be nice to have a semi-recent benchmark in the readme.

@Valve
Copy link

Valve commented Apr 18, 2019

We have it in production and it consistently takes ~30-40ms on a t3.micro AWS instance.
That's the slowest component in a request. Is there a way to speed it up?

@oschwald
Copy link

oschwald commented Jun 5, 2019

We also ran into this. It is by far the most expensive thing in serving a response for our service. Unfortunately, I don't think improving the situation would be easy as most of the time seems to be spent in regexp and any change to the regular expressions would affect other languages as well.

@Valve
Copy link

Valve commented Jun 6, 2019

@oschwald, I was able to drastically reduce the processing by caching the initialized parser.
The trick there is to keep only one instance of the parser around, and then the Parse method itself is sufficiently fast (2-3ms in our case). Hope this helps

@oschwald
Copy link

oschwald commented Jun 6, 2019 via email

@ronbeltran
Copy link

@Valve how do you cache the initialized parser? Can you pls some code snippets.

@dzbarsky
Copy link

#71 should be a pretty big win. You can switch to my fork if you'd like.

@ammario
Copy link
Contributor

ammario commented Feb 26, 2023

#75 has another sped up version via caching.

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

No branches or pull requests

6 participants