Menu

#6 Threaded process

17.x
open
Nikkho
suggestion (1)
2022-07-17
2016-05-05
Alorel
No

Hello. Would you consider turning the program into a threaded solution? For example, make it use a thread pool with one image per thread or one algorithm per thread (the latter would be the preferred option as it would affect one file compressions as well). This would speed the process up considerably.

Discussion

  • Nikkho

    Nikkho - 2016-05-06
    • assigned_to: Nikkho
    • Milestone: 8.x --> 9.x
     
  • rmenessec

    rmenessec - 2017-08-21

    As a temporary measure, can you dispatch compression jobs to a "worker process" that will handle the threading / multiprocess? I don't know what it would require to work on Windows, but I make heavy use of GNU Parallel from the command line when I'm just trying to run a lot of files through zopflipng.

    Parallel provides regular feedback on jobs completed / remaining, estimated ETA, and so forth. It doesn't need to understand the particular sort of jobs it's executing; it simply invokes whatever third-party processes it's told to.

    This wouldn't be as nice as a truly multithreaded / multiprocess UI and backend job handler, but it would ensure that multicore machines are taken full—or nearly full—advantage of.

    This is why I spend a lot of time compressing things on remote machines instead of using FileOptimizer, in fact.

     
  • Nikkho

    Nikkho - 2022-07-17
    • Milestone: 9.x --> 17.x
     

Log in to post a comment.