steviez Posted October 10, 2009 Share Posted October 10, 2009 Hi, I have a script on my site that creates thumbnails on the fly, my question is: will it affect server performance greatly doing thumbnails this way? I have quite a few different sizes to display that creating them all would be too much space used. Thanks in advance Quote Link to comment https://forums.phpfreaks.com/topic/177191-thumnails-on-the-fly/ Share on other sites More sharing options...
lostnucleus Posted October 10, 2009 Share Posted October 10, 2009 create and save the thumbnail on the server , so if the same thumbnail is requested again you dnt need to creat it again. Quote Link to comment https://forums.phpfreaks.com/topic/177191-thumnails-on-the-fly/#findComment-934272 Share on other sites More sharing options...
steviez Posted October 10, 2009 Author Share Posted October 10, 2009 create and save the thumbnail on the server , so if the same thumbnail is requested again you dnt need to creat it again. Yes but i have like 10 different sized thumbs to create and space is a problem Quote Link to comment https://forums.phpfreaks.com/topic/177191-thumnails-on-the-fly/#findComment-934273 Share on other sites More sharing options...
Garethp Posted October 10, 2009 Share Posted October 10, 2009 Why not just use the HTML width and height setting? That's what I never understood Quote Link to comment https://forums.phpfreaks.com/topic/177191-thumnails-on-the-fly/#findComment-934276 Share on other sites More sharing options...
steviez Posted October 10, 2009 Author Share Posted October 10, 2009 Why not just use the HTML width and height setting? That's what I never understood Because if you have a larger image and you want to scale it down to say 64x64 then it slows the page down Quote Link to comment https://forums.phpfreaks.com/topic/177191-thumnails-on-the-fly/#findComment-934277 Share on other sites More sharing options...
lostnucleus Posted October 16, 2009 Share Posted October 16, 2009 create and save the thumbnail on the server , so if the same thumbnail is requested again you dnt need to creat it again. Yes but i have like 10 different sized thumbs to create and space is a problem sorry but u have to trade off one thing for another since hardisk is lot cheaper resource as compared to RAM and CPU hence saving them is still a good option . Quote Link to comment https://forums.phpfreaks.com/topic/177191-thumnails-on-the-fly/#findComment-937923 Share on other sites More sharing options...
kickstart Posted October 16, 2009 Share Posted October 16, 2009 Hi Tend to agree with the above. HD space is cheap . If you have major issues with space then store a list on a db of each resized thumbnail and when they were last accessed (or if your operating system supports it get the last accessed date for the files through php), and store as many as you can while deleting off the cached versions that haven't been accessed for a while. All the best Keith Quote Link to comment https://forums.phpfreaks.com/topic/177191-thumnails-on-the-fly/#findComment-937934 Share on other sites More sharing options...
steviez Posted October 16, 2009 Author Share Posted October 16, 2009 all thumbs are created during photo upload, lets say the system, needs to make 10 thumbs of each photo uploaded and 20 people are uploading at once wont the system just fold up? Quote Link to comment https://forums.phpfreaks.com/topic/177191-thumnails-on-the-fly/#findComment-937935 Share on other sites More sharing options...
lostnucleus Posted October 16, 2009 Share Posted October 16, 2009 all thumbs are created during photo upload, lets say the system, needs to make 10 thumbs of each photo uploaded and 20 people are uploading at once wont the system just fold up? hopefully this ill help zend platform job queues http://files.zend.com/help/Zend-Platform-i5/job_queues.htm Quote Link to comment https://forums.phpfreaks.com/topic/177191-thumnails-on-the-fly/#findComment-938235 Share on other sites More sharing options...
kickstart Posted October 16, 2009 Share Posted October 16, 2009 all thumbs are created during photo upload, lets say the system, needs to make 10 thumbs of each photo uploaded and 20 people are uploading at once wont the system just fold up? Compared to the time uploading, creating a thumbnail takes little time. But you can just create them when required and store them for future use. All the best Keith Quote Link to comment https://forums.phpfreaks.com/topic/177191-thumnails-on-the-fly/#findComment-938244 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.