-
-
Notifications
You must be signed in to change notification settings - Fork 137
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
There is a bad performance hit when upgrading to >= 1.9.2 #325
Comments
It appears that this is caused by significant memory over-allocation. Parsing a 7MB YAML file with 1.9.3 I see the following information from a memory profile:
i.e. over 250GB of allocations. Bisecting between 1.9.2 and 1.9.3 provides the commit that introduced this issue: afed407 |
At a first glance, that was my suspicious commit also. |
Is there any news on this? Shall we test with latest? |
Looks like with 1.11.0 this is not a problem anymore. I don't know about memory usage.
|
Well, after some additional testing by the team, this hasn't gone away yet. Don't know why it was working before, but this is a really hitting us.
I've tried most of the versions up to latest 1.11.2, and this is taking ages to process. |
@goccy Can you take a look at this one? Seems like this performance penalty is just preventing us to upgrade to latest and greatest. |
ping |
I created a PR to fix some of the memory allocation issue. This in turn also allows the parser to run faster. Can you test my change and see if it helps with your situation? I use the replace directive when doing my test: replace github.com/goccy/go-yaml => github.com/yoelsusanto/go-yaml v0.0.0-20240324162521-2018c1ab915b |
I ran a few benchmarks using v1.9.2:
v1.9.3
v1.11.3:
v1.11.3-patched:
As you can see, the patch clearly has the desired effect, even if time per operation isn't at the level of v1.9.2. For us that is good enough. Thanks @yoelsusanto! |
@yoelsusanto @goccy We're still blocked from upgrading because this PR hasn't been merged yet. In the mean time, we've encountered other bugs that have been fixed upstream. Please pick up this PR! |
We found out that after upgrading to 1.9.6 there was a big hit in reading ~~ 270 files. After doing some version comparisions, the problem seems to be introduced in v1.9.3.
See coreruleset/go-ftw#115. Right now we downgraded to pre 1.9.3, but probably we want to check out what the problem is and write some benchmarks.
The text was updated successfully, but these errors were encountered: