rejetto forum
May 25, 2012, 04:43:37 AM *
Welcome, Guest. Please login or register.
Did you miss your activation email?

Login with username, password and session length
News: This forum is free, you do NOT need to register to post. But you may.
PROBLEMS? QUESTIONS? CLICK HERE!
Fill the survey!
 
   Home   Help Search Login Register  
Pages: [1]
  Print  
Author Topic: thumbnail by macro  (Read 1638 times)
0 Members and 2 Guests are viewing this topic.
rejetto
Administrator
Insane programmer
*
Offline Offline

Italy Italy

Posts: 11830


View Profile
« on: July 01, 2008, 06:53:59 AM »

if i make the macro for running external software, this may be used run an external "thumbnailer" only when the thumbnail file doesn't exist.
would this fill the gap to get a template with real thumbnails?
Logged
TSG
Operator
Insane poster
*****
Offline Offline

Australia Australia

Posts: 1919



View Profile WWW
« Reply #1 on: July 01, 2008, 08:38:12 AM »

Maybe... but what if an entire gallery is not done? will the site sit there blank generating thumbnails then load up the page... or cache the thumbnails in the background and on next refresh they are there...
Logged

rejetto
Administrator
Insane programmer
*
Offline Offline

Italy Italy

Posts: 11830


View Profile
« Reply #2 on: July 01, 2008, 08:49:23 AM »

to solve such issue, i guess a template could, meeting a missing thumbnail, add the filename to a batch file, and output a placeholder to the browser.
at the end of the template generation, run the batch file as a background process (not stopping hfs).

this lead us to another problem: 2 visitors may issue twice the thumbnail making.
it can be solved by creating a "locking" temp file, by creating a file named "thumbs\"+filename+".lock", that will be deleted by the batch file after the generation.
Logged
Giant Eagle
Insane poster
*****
Offline Offline

Netherlands Netherlands

Posts: 533


>=3 RAWR!

no.body056@gmail.com
View Profile WWW
« Reply #3 on: July 01, 2008, 08:56:35 AM »

if i make the macro for running external software, this may be used run an external "thumbnailer" only when the thumbnail file doesn't exist.
would this fill the gap to get a template with real thumbnails?

It would most certainly work for files that are being uploaded to the server. When they are uploaded, the thumbnails will get generated.

Maybe... but what if an entire gallery is not done? will the site sit there blank generating thumbnails then load up the page... or cache the thumbnails in the background and on next refresh they are there...

This needs some thougts, as a folder with 100+ images could take a while to convert (if you want acceptable thumbnails that is). Best thing would be to convert them in the background.

this lead us to another problem: 2 visitors may issue twice the thumbnail making.
it can be solved by creating a "locking" temp file, by creating a file named "thumbs\"+filename+".lock", that will be deleted by the batch file after the generation.

That could be solved by using a "only one instance" application. Just run the application multiple times with the location to the files as command line parameters. These files get stored in a "To-convert" list. Multiple files get discarded.
Logged

Rest in peace 500mhz server, you served me well...
New 1500mhz server DOA'ed on me >_>
New 2400mhz server up and running again Grin

Pages: [1]
  Print  
 
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.16 | SMF © 2011, Simple Machines Valid XHTML 1.0! Valid CSS!


Google visited last this page May 20, 2012, 12:36:12 AM