box2-lib icon indicating copy to clipboard operation
box2-lib copied to clipboard

Output buffering during buildFrom* functions

Open vaind opened this issue 8 years ago • 2 comments

Improves performance by ~ 20 % if there are a lot of files

see the original pull request https://github.com/box-project/box2-lib/pull/21

vaind avatar Jul 18 '16 10:07 vaind

I did a quick performance test using Symfony and got the following results:

Before PR:

Building...

real    15m51.610s
user    6m55.666s
sys     7m22.764s

After PR:

Building...

real    16m40.861s
user    7m12.818s
sys     7m40.737s

Could you provide me with your own benchmarks with details on what you built to perform the test?

kherge avatar Jul 27 '16 16:07 kherge

I was finally able to test this. The PR improves performance on HDD but you are right, it really does decrease perf. on SSD (or any other fast IO drive, e. g. /tmp mounted in RAM). As such, I leave the decision whether to pull this up to you. Moreover, It may be useful to update the documentation and add some recommendation about creating and building a phar on fast drive/storage and than moving it to the target location.

vaind avatar Aug 15 '16 09:08 vaind