GithubHelp home page GithubHelp logo

Comments (3)

lovell avatar lovell commented on May 28, 2024

with 8 cores each

This looks like a CPU with 4 physical cores.

pre-processing each image in 5 different versions, all images are in avif

The bottleneck will almost certainly be AVIF encoding (via libaom).

At a guess the problem may be too many (hyper-)threads. You'll need to provide a complete, standalone code sample and images that allows someone else to both reproduce and profile if you'd like help optimising this further.

from sharp.

woss avatar woss commented on May 28, 2024

Uh, a common language mistake about the cores.

Unfortunately, I cannot extract the example from the source code, it is not public. But the fact that the avif might be the slow part is already a start.

I assume jpg is faster?

At a guess the problem may be too many (hyper-)threads

What do you mean by this?

from sharp.

lovell avatar lovell commented on May 28, 2024

I assume jpg is faster?

Yes, usually significantly, the degree to which can depend on the type of images you're processing.

At a guess the problem may be too many (hyper-)threads

What do you mean by this?

Without sample code and images to reproduce it's hard to say, but it's possible the overhead of thread management and/or CPU cache thrashing might be slowing things. Sometimes reducing concurrency and/or parallelism can help improve throughput.

from sharp.

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.