Performance enhancements
Posted: Thu May 24, 2007 7:30 pm
Using ImageMagick's convert utility to resize jpegs is much faster:
in zm_funcs.php getImageSrc():
vs.
To display a 25 event list on my system, ImageMagick takes 5 seconds vs. 85 seconds with existing tools.
In MySQL queries that return a single item from a sorted list, e.g. in zm_funcs.cpp, createListThumbnail(), using LIMIT 1 is marginally faster than using LIMIT 0,1. But in lists, marginally adds up.
in zm_funcs.php getImageSrc():
Code: Select all
$command = ZM_PATH_NETPBM."/convert -size ".ZM_WEB_LIST_THUMB_WIDTH."x".ZM_WEB_LIST_THUMB_HEIGHT." $image_path $thumb_path";
Code: Select all
$command = ZM_PATH_NETPBM."/jpegtopnm -quiet -dct fast $image_path | ".ZM_PATH_NETPBM."/pnmscalefixed -quiet $fraction | ".ZM_PATH_NETPBM."/pnmtojpeg -quiet -dct=fast > $thumb_path";
In MySQL queries that return a single item from a sorted list, e.g. in zm_funcs.cpp, createListThumbnail(), using LIMIT 1 is marginally faster than using LIMIT 0,1. But in lists, marginally adds up.