-
Notifications
You must be signed in to change notification settings - Fork 1
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
Excessive use of GC #32
Comments
I've confirmed that it is the |
@ianroberts I'm part way there with a new Line 95 in 58f5ad6
Annoyingly it's not in the PR so would need to pass an option through to turn it on/off. I'm tempted just to remove it completely as that code gets run between the other two explicit GC calls so from the point of view of seeing the increase in heap it shouldn't make any difference, but what do you think? |
This particular one I guess is slightly less crucial as it's not on the critical path when duplicating an existing PR, only when first loading a new one, but yeah, either take it out completely or add some sort of static configuration like only doing the GCs if |
Currently the code does an explicit GC both before and after loading the gazetteer so that it can report on memory consumption. It does this even when duplicating a PR in which no extra memory is allocated. We've seen each GC take as much as 5s, so when using this on cloud or GCP it can add quite an overhead: 40s for 4 threads is just GC. On cloud this is possibly what's causing the prometheus warnings as the full load time is high.
The suggestion is to add a new debug or profiling option to the PR, so that in normal usage we don't report the memory consumption and don't explicitly run the GC.
The text was updated successfully, but these errors were encountered: