-
Notifications
You must be signed in to change notification settings - Fork 274
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
Performance regression in version 1.11 #462
Comments
What does your mount-zip do - is it only reading the files or does it actually change the archive? |
Looking at the diff of that commit, one line stands out: zip_open.c:
530 + || !_zip_string_equal(central->filename, local->filename)) Could you try running your test with this line removed (and a closing |
The test archive See Many (compressed).zip. Note that, in order to upload In the section of the code where its time is measured, I modified
but that doesn't change the performance:
|
I also noticed that the "system" time was doubled by commit 7a53a1a. So I traced the system calls using the following command before and after commit 7a53a1a.
See traces.zip. There is a stark difference in the number of issued system calls, going from ~300k to ~500k.
Looking at the differences,
The pattern of syscalls is really regular. There are 2 extra syscalls to |
We've moved the call to |
This change makes each call to
Yes, Would it be possible to fix this performance regression in |
We now cache the conversion results. We're confident this will fix the performance regression, but would appreciate if you could confirm it. |
Oh great. Thanks. I confirm that commit c2854be fixes the performance regression. At commit 46e309f (which is just before the commit that fixes the performance regression):
At commit c2854be (which fixes the performance regression):
The performance is back to what it used to be before commit 7a53a1a (which introduced the performance regression). |
Thanks for the report and the testing! |
Would you now consider releasing an official version containing this fix? That would allow me to simply upgrade the version of |
I've just released libzip 1.11.2. Thank you for your support! |
Perfect. I'm now upgrading our version of |
Fixed, thanks. |
I recently upgraded the version of
libzip
used by ChromeOS from version 1.10.0 to 1.11.1 which was released last month. Soon after, our automated performance tests picked up a significant performance regression.A bisection of the
libzip
code points to commit 7a53a1a as the source of the performance regression. This single commit doubles the time taken to list all the files of a ZIP containing a significant number of files.Example at commit f0eff80, which is the last one before the performance regression:
$ time mount-zip Many.zip real 0m0.759s user 0m0.289s sys 0m0.473s
Example at commit 7a53a1a, which introduces the performance regression:
$ time mount-zip Many.zip real 0m1.436s user 0m0.376s sys 0m1.062s
I tried to revert commit 7a53a1a at version 1.11.1, but there are quite a few merge conflicts that prevent me from doing so.
There is no mention of an expected performance regression in commit 7a53a1a.
The text was updated successfully, but these errors were encountered: