Git Product home page Git Product logo

Comments (6)

svgeesus avatar svgeesus commented on April 28, 2024

As Brotli is deliberately designed to be asymmetric (favouring decompression speed over compression speed) it would be interesting to know where it ranks on decompression time on that image.

from brotli.

nemequ avatar nemequ commented on April 28, 2024

Decompression speed is about right. Look at the benchmark I linked to. The results table can be sorted by decompression speed; just click on the "Decompression Speed" header of the results table.

The problem is that this is a huge outlier for brotli's compression speed. It's so slow that it basically amounts to a DoS vulnerability. It takes an hour to compress an 8.1 MiB file (on a Xeon E3-1225 v3), which is 5.62 KiB/s. The next slowest file (ooffice, which is a 5.87 MiB DLL from OpenOffice.org 1.01) is 59.9 KiB/s.

I think a lot of the compression speeds are pretty bad when you look at Brotli's competition (LZHAM is probably the closest competitor—it offers pretty similar ratios and decompression speed but much more stable, and generally faster compression). But 5.62 KiB/s is just unacceptable.

from brotli.

nemequ avatar nemequ commented on April 28, 2024

It's probably not unrelated that brotli also allocates a lot of memory for this file. One of my ARM boards (with 1 GiB memory) mercifully terminates with a std::bad_alloc exception (hopefully the others will, as well). An old laptop with 1 GiB memory and plenty of swap space, OTOH, is still happily thrashing after 50 hours. Peak memory usage for that process right now is 1790520 KiB, current is 1266228. For an 8.1 MiB file.

from brotli.

eustas avatar eustas commented on April 28, 2024

I believe this has been fixed.
I've measured compression of x-ray on odroid-c1 with broltli (level 11) - it took 5 min 41 sec, so the speed is about 24 KiB/s. On rpi-2 it would take 10-15 minutes to compress.

With lower level it works much faster. E.g. with level 1 it takes less than 2 sec; on level 9 it works 1 min 24 sec.

Probably it is time to reevaluate brotli compression...

from brotli.

eustas avatar eustas commented on April 28, 2024

FWIW, time -f "%M" shows that brotli uses ~310MB of memory when compress x-ray (on level 11)

from brotli.

nemequ avatar nemequ commented on April 28, 2024

I just updated the benchmark, and this issue does seem to be fixed.

Brotli has made a lot of progress in the last few months.

from brotli.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.