Home > tools, user > Improved Preview Handling

Improved Preview Handling

October 10th, 2010 Leave a comment Go to comments

Recently the preview handling was improved and partly rewritten. The speed boost by the Fast File Responder was previously described here. Before r632 each preview was rendered by the original image which consumed a lot of time. Now an image preview manager was introduced which reuses existing down sampled images to gain speed. While each conversion from the original image costs about 4.4s, the down sampling from an 600px to 220px requires only 0.2s Further each preview configuration (defined in the Preview Manager Component) might be depend on a greater preview image. These dependencies might trigger the generation of all previews before calculating the requested one.

Unfortunately, the preview cache file schema changed and all previews have to be recalculated again. However, since r639 phTagr supports the batch generation of previews with a CakePHP shell script preview. You can create these previews at the command with

$ cd <phtagr base>
$ cake/console/cake preview
Help screen
---------------------------------------------------------------
This shell generates preview images in batch mode.
 
generate
 Generate previews.
---------------------------------------------------------------
Options:
-max count
 Maximum generation count. Default is 10. Use 0 to generate all previews.
-start-chunk number
 Set the start chunk number. A chunk has a size of 100 media. Default is 1.
-size (mini|thumb|preview|high)
 Set the minimum preview size. Default is thumb.
-user username
 Generate only previews for given user.
-verbose
 Be verbose
---------------------------------------------------------------
$ preview generate -size mini -verbose
Page 1/180 (0.56%)
Page 2/180 (1.11%)
Page 3/180 (1.67%)
...
Categories: tools, user Tags: ,
  1. No comments yet.
  1. No trackbacks yet.

*
To prove you're a person (not a spam script), type the security word shown in the picture. Click on the picture to hear an audio file of the word.
Click to hear an audio file of the anti-spam word