|
|
|||||||
| Register | FAQ | Calendar | Radio and TV | NP Shop | Search | Today's Posts | Mark Forums Read |
| Adult Webmasters Main Forum Friendly adult web master chat, help and information |
![]() |
![]() |
![]() |
![]() |
|
|
LinkBack | Thread Tools | Display Modes |
|
|
#1 (permalink) |
|
constant angry scowl - free of charge.
|
Advice requested from any coders!
Hey folks,
So I've got this dilemma. I've built an entire system to automate site updating with new image sets. Basically, I can upload a directory of images, and when the site updates, it will automatically thumbnail all of the images and build an index.html file in the image set directory which is a thumbnail gallery. The problem is--the gallery is thumbnailed by an image cropping PHP script. Hence, it requires alot of resources. This isn't a problem for 2-3 image sets, but if I make a huge update of 20-30 galleries, it takes a couple of minutes, which will definately lag the server, and since I'm on a shared hosting account, this will kill all of resources, and thus, I will be screwed. Anybody have a good idea how I should go about server-side thumbnailing that will not destroy my server? Maybe if someone else has done this sort of thing, they will have a good idea of how to do it efficiently but without taking up too many system resources. Thanks! __________________
Any questions regarding: HTML, CSS, Javascript, PHP, VB.NET, or anything else computer-related, never hesitate to contact me on AIM @ 'g3ddy'. ![]() Excellent hosting, great support, huge bandwidth, lots of storage space! |
|
|
|
|
|
#4 (permalink) |
|
Traffic Animal
|
I belive there is an apache mod that allows you to cap resources used by a certain user account...
http://httpd.apache.org/docs/2.0/mod/core.html i am sure you can find similar or modded for the purpose u need. __________________
ICQ: 343 896 902 BUY AND SELL TRAFFIC !!! --- Get .com domains for $6.95 !!! Reliable hosting provider - Dreamhost promo codes list |
|
|
|
|
|
#5 (permalink) | |
|
and the award for the most annoying avatar...
Join Date: Feb 2006
Posts: 3,746
Points: 1,675
|
why not build the thumbs as the gallery page is loaded. that way, they're not all created at the same time.
__________________
Quote:
|
|
|
|
|
|
|
#6 (permalink) |
|
Learning ...Still learning
Join Date: Jun 2007
Posts: 75
Points: 375
|
Caching...
have a thumbnail script that after the thumbnail has been generated writes the file into af /cache folder so next time your thumbnail script is asked to thumb that picture, it just loads up the cached thumb, and writes it back to the browser... that's the simple version, more advanced could be with timestamp checking and so on.. -SurfViking __________________
I like Juggcash |
|
|
|
|
|
#7 (permalink) |
|
constant angry scowl - free of charge.
|
Well, it only thumbnails everything once.. each time it finds a new set it does this. But I can only thumbnail the images that one time as soon as the first person clicks on a set.. but if the traffic gets too high and it's thumbnailing like crazy, I think that's going to cause even more problems with system resources.
I think I may have to just program an administration area where I can make updates from. Thanks for the suggestions though folks! __________________
Any questions regarding: HTML, CSS, Javascript, PHP, VB.NET, or anything else computer-related, never hesitate to contact me on AIM @ 'g3ddy'. ![]() Excellent hosting, great support, huge bandwidth, lots of storage space! |
|
|
|
|
|
#8 (permalink) |
|
Is Aga really Little Buddha?
|
php sucks in this case. use some perl script and imagemagik installed in safe mode. (they have some option like this)
__________________
LONGBUCKS - Teen, Mature, Reality, Gay sites. Unlimited free hosting (with cgi/php/mysql/cron etc). FHGs. Free content. Signup now and icq me for support - 313-882-945 |
|
|
|
|
|
#9 (permalink) |
|
Learning ...Still learning
Join Date: Jun 2007
Posts: 75
Points: 375
|
Well there is another option
on the gallery page, use the "oncomplete" event on the img tag to load 1 thumbnail at a time.... that way it won't spawn 20-30 thumbnail calls at the same time... and if you use a bit of disk caching in your thumbnail script, resources are kept at a minimum.. I could do a small javascript pseudocode example of this if you wanted ? -SurfViking __________________
I like Juggcash |
|
|
|
![]() |
| Thread Tools | |
| Display Modes | |
|
|
![]() |
![]() |