Giter Site home page Giter Site logo

How to use GPU acceleration? For example, Nvidia? Can GPU be used to accelerate image display? Currently, the display speed for high-resolution images is a bit slow.. about pigallery2 HOT 3 OPEN

leeyonwang avatar leeyonwang commented on June 1, 2024
How to use GPU acceleration? For example, Nvidia? Can GPU be used to accelerate image display? Currently, the display speed for high-resolution images is a bit slow..

from pigallery2.

Comments (3)

bpatrik avatar bpatrik commented on June 1, 2024

from pigallery2.

tschaerni avatar tschaerni commented on June 1, 2024

You need faster disk and network for that. Or your machine that you run the browser in needs hardware acceleration.
Sorry, but that sounds a bit like a lame excuse.

I have a large gallery of around 900GB with some quite high resolution images.

  • 10Gbit network
  • Storage backend are NVMe SSDs
  • 16/32 Core/threads CPU
  • 128GB of RAM dedicated for Filesystem Caching

I noticed that:

  • there are generally only 1-2 threads doing actual work when generating thumbnails
  • if I open a picture in the browser it displays the preview/thumbnail for multiple seconds, and only after that, it starts loading the image, and network traffic peaks at around 2-3MBit.
  • IOPS stays very low
  • Read speed of the storage array stays low

So in summary:
My setup is capable of reading (and writing) over 1GByte per second over the network. If I download an image over pigallery2 it's instant, even if the image is 20-30MB big. But opening up multiple tabs to stress test it, I only see 200-300% CPU load at most from the node process.

Maybe sounds a bit harsh, but I just want to give some constructive feedback as I actually really like pigallery2 and it's concept.
It just seems like your software can be improved quite a bit, as throwing more hardware at the problem doesn't seem to work.

PS: yes I also tried different browsers, same behaviour.

from pigallery2.

bpatrik avatar bpatrik commented on June 1, 2024

You need faster disk and network for that. Or your machine that you run the browser in needs hardware acceleration.
Sorry, but that sounds a bit like a lame excuse.

My understanding on the original question is that displaying the image on the client side is slow. That is limited by client side resources and server side upload speed, hence my answer.

if I open a picture in the browser it displays the preview/thumbnail for multiple seconds, and only after that, it starts loading the image, and network traffic peaks at around 2-3MBit.

my guess is that you did not pre-generated all thumbnail/converted photo sizes. App does not load the original image by default for performance reasons. It only loads original on zoom (subject to settings). If the full preview image is not generated, it will do it on the fly. That can take up 1-2s.
Once you full preview size of a photo is generate it should load instantaneously.
If you click on the autoplay, It wont go to the next image until the next full size image is available on the client side, so there is 0 wait time.

Im talking about this:

kép
kép

Your hardware is far more powerful for the app. I did not have loading time on a RP 4 through 1MB/s internet network.

from pigallery2.

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.