Comments (5)
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.
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.
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.
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.
ok, thank you for explanation
from efficient-compression-tool.
Related Issues (20)
- Could NOT find Threads (missing: Threads_FOUND) HOT 1
- Use CI to build release binaries
- How to only strip the metadata from PNG files? HOT 1
- ECT built from source for Apple Silicon is slower than release x86/64 build HOT 6
- `-strip` with gzip does not drop original name in metadata HOT 2
- Suggestion for lossless confirmation HOT 1
- Infinite loop via FileOptimizer since 0.9.2 HOT 44
- Using '-zip' option leaves temporary '..zip' file when used on folder HOT 2
- Request: Document what the `--strict` option does HOT 1
- Is building on arm64 / aarch64 supported? HOT 2
- Access violation in merge.h in windows release build only HOT 1
- [Enhancement] Animated PNG (APNG) support HOT 4
- --disable-png and --disable-jpg are ignored when -gzip is given. HOT 2
- Per file and per block multithreading don't work correctly HOT 3
- replace functions with Array
- "bad png file" if Japanese character is in path HOT 1
- Possible equivalent of `--mt-file` when recompressing files contained zip and gzip archives HOT 1
- Please add unicode support HOT 3
- Request: Distribute via homebrew HOT 1
- Prebuilt binary with PGO here HOT 8
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from efficient-compression-tool.