Giter Site home page Giter Site logo

Comments (7)

paolobenve avatar paolobenve commented on September 17, 2024

It seems that a long time is needed to launch the parallel process

from myphotoshare.

joachimtingvold avatar joachimtingvold commented on September 17, 2024

Hi,

I'm going to look at it. I also want to implement "the best from both worlds"; combine both parallel and cascade. Something like this; for each "album" (folder), queue all images that needs thumbnails, and after all the files in that folder is done, start processing the queued objects. For each queue (currently n-1, where n=number of cores), do cascade thumbnailing for each image. This would also utilize the cores more efficiently (since the current parallel is limited to the number of thumbnails -- if you have 20 cores, and you only have 150/800/1200/1600px thumbnails, you'd only use 4 cores).

My only concern with cascade, is "JPEG-ification" of the images (i.e. JPEG-artifacts gets worse and worse for each "cascade"). Either way this "redesign" of parallel/cascade would still make it faster than it currently is, even if one disables the cascade (via options/config).

from myphotoshare.

paolobenve avatar paolobenve commented on September 17, 2024

The cascade code doesn't jpeg-ificats any image, because, it works with the internally resized image, and doesn't read any jpg thumbnail from disk.

from myphotoshare.

joachimtingvold avatar joachimtingvold commented on September 17, 2024

You still get one more iteration? Not sure if it's visible to the naked eye, though.

Cascade;

Original image --> 1600px
1600px --> 1200px
1600px --> 800px
1600px --> 150px

Non-cascade;

Original image --> 1600px
Original image --> 1200px
Original image --> 800px
Original image --> 150px

from myphotoshare.

paolobenve avatar paolobenve commented on September 17, 2024

?

from myphotoshare.

joachimtingvold avatar joachimtingvold commented on September 17, 2024

My point was that you get one extra JPEG-transcode when doing cascade, compared to non-cascade, and in theory this would introduce more JPEG-artifacts.

I'll look into this -- the "combined" mode you already prepared/did should in theory be the fastest, at least once I'm done optimizing it (i.e. figure out why parallel is slow in the first place, and then combine the two).

from myphotoshare.

paolobenve avatar paolobenve commented on September 17, 2024

JPEG-transcode happens when the thumbnail is saved. Every thumbnail is saved once, independently of the method used to generate it

from myphotoshare.

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.