Git Product home page Git Product logo

Comments (5)

AlyoshaVasilieva avatar AlyoshaVasilieva commented on September 22, 2024

Set mode to 1, 2, or 3 (or don't specify, which makes it 3) instead of 9. With mode >= 4 ECT will always try to generate a non-progressive JPEG in case that is smaller. However, for large files it is extremely unlikely to be the case and will just waste time.

For me, ECT -1 -progressive -strip is faster than mozjpeg's jpegtran -copy none

from efficient-compression-tool.

ertyz avatar ertyz commented on September 22, 2024

Without progressive mode operation is fast, yes. But what I want to say, is in both cases ECT and leanify uses "progressive" mode, both keep metadata and both work over mozjpeg. And finally we get binary equivalent files. And anyway ECT work 2-3 times slower.

PS > (Measure-Command {Write-Host ((.\ECT --mt-deflate -p --strict -1 G:\test\jpg\ect1p) | Out-String)}).TotalSeconds
Processed 4 files
Saved 1.58MB out of 12.41MB (12.7567%)

9.539432
--------------------------------------------------
PS > (Measure-Command {Write-Host ((.\ECT --mt-deflate -p --strict -3 G:\test\jpg\ect3p) | Out-String)}).TotalSeconds
Processed 4 files
Saved 1.58MB out of 12.41MB (12.7567%)

9.5062151
--------------------------------------------------
PS > (Measure-Command {Write-Host ((.\ECT --mt-deflate -p --strict -9 G:\test\jpg\ect9p) | Out-String)}).TotalSeconds
Processed 4 files
Saved 1.58MB out of 12.41MB (12.7567%)

12.5015205
--------------------------------------------------
PS > (Measure-Command {Write-Host ((.\Leanify -i 5 --jpeg-keep-all-metadata G:\test\jpg\lean5) | Out-String)}).TotalSeconds
Processing: G:\test\jpg\lean5\20170331_150507_P3310610.JPG
7.04 MB -5.82 MB      Leanified: 1.22 MB (17.32%)
Processing: G:\test\jpg\lean5\IMG_20160719_191416.jpg
1.29 MB -1.23 MB      Leanified: 68.64 KB (5.18%)
Processing: G:\test\jpg\lean5\IMG_20160723_170356.jpg
473.80 KB -441.52 KB  Leanified: 32.28 KB (6.81%)
Processing: G:\test\jpg\lean5\IMG_20170329_194935.jpg
3.62 MB -3.35 MB      Leanified: 271.70 KB (7.34%)

4.7928518
--------------------------------------------------
PS > (Measure-Command {Write-Host ((.\Leanify -i 30 --jpeg-keep-all-metadata G:\test\jpg\lean30) | Out-String)}).TotalSeconds
Processing: G:\test\jpg\lean5\20170331_150507_P3310610.JPG
7.04 MB -5.82 MB      Leanified: 1.22 MB (17.32%)
Processing: G:\test\jpg\lean5\IMG_20160719_191416.jpg
1.29 MB -1.23 MB      Leanified: 68.64 KB (5.18%)
Processing: G:\test\jpg\lean5\IMG_20160723_170356.jpg
473.80 KB -441.52 KB  Leanified: 32.28 KB (6.81%)
Processing: G:\test\jpg\lean5\IMG_20170329_194935.jpg
3.62 MB -3.35 MB      Leanified: 271.70 KB (7.34%)

4.7994808

p.s. without '-p' flag we need only 3.2 seconds, but leanify can't switch off that flag, so I can't make a related comparison

from efficient-compression-tool.

ertyz avatar ertyz commented on September 22, 2024

And as I notice, we always get binary same output jpeg files if flag "--strict" is set, doesn't matter "-1" or "-9" is set. But "-9" always want more time. May be we need to ignore "-1-9" flags if "--strict" mode is set?
Should I make it as new issue?

from efficient-compression-tool.

AlyoshaVasilieva avatar AlyoshaVasilieva commented on September 22, 2024

It is the binaries in FileOptimizer that are the problem, I think. Using my AVX2 compile of current ECT vs FileOptimizer's Leanify:

PS C:\temp\test> Measure-Command { .\Leanify.exe -i 30 .\out_leanify.jpg }
TotalSeconds      : 1.4554144

PS C:\temp\test> Measure-Command { ect -1 -strip -progressive .\out_ect.jpg }
TotalSeconds      : 1.2696275
PS C:\temp\test> Measure-Command { .\Leanify.exe -i 30 .\leanfolder\ }
TotalSeconds      : 5.7131207

PS C:\temp\test> Measure-Command { ect -1 -strip -progressive .\ectfolder\ }
TotalSeconds      : 5.0195643

From more testing, if I compile ECT with anything less than -msse4 (FileOptimizer is probably SSE2 ECT) JPEG compression time doubles. I don't know why this happens. I don't know if it's bug in compiler or fhanau's code.

from efficient-compression-tool.

ertyz avatar ertyz commented on September 22, 2024

ok, thank you for explanation

from efficient-compression-tool.

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.