technopagan / adept-jpg-compressor

A Bash script to automate adaptive JPEG compression using common CLI tools
Other
377 stars 28 forks source link

Measure function runtime to find optimization potential #11

Open technopagan opened 11 years ago

technopagan commented 11 years ago

After implementing automated black-white threshold detection and automatic tile-size adaption, the perceived runtime performance has dropped.

In the course of implementing unit tests, let's also implement function runtime measurements via "time" to see which processes take up the lion's share of total runtime. This will guide us to the parts of Adept's code that neeed priority in optimization.

joeyhoer commented 10 years ago

The main issue here is that iterating over all of the individual "cells" with bash is expensive; optimizing the shell script will only get us so far. If optimizing runtime speed/performance is the objective, the best solution is likely to port the code to C https://github.com/technopagan/adept-jpg-compressor/issues/27