My site has been using ASPImage for a long time. Recently, Yash and I have been exchaning messages on the amount of RAM my site was using. JH staff have been recycling my site in an attempt to minimize the amount of RAM used by my site. To my knowledge, this has only impacted the effort required by JH admin’s and have not caused adverse affects on other sites.
My site has an average of 65000 page hits/day, 85000 hits/day and traffic of 280M/day. ASPImage was being used a lot.
I just recently switch from ASPImage to ASPJPEG. The actual changes in code were minimal and easy to make. Apparently this change has totally eliminated the RAM usage problem. This suggests to me that ASPImage basically sux. (If I had known that ASPImage was the cause of such a problem, I would not have used it in the first place.)
I urge everyone to not use ASPImage and use ASPJPEG instead. This will help ensure stability of the JH servers and allow the JH admins to look into and resolve more serious problems.
As to a guide to switching, here are the changes to my code:
Sorry yes I did Stephen. That’s good news, I’ll try adding the progress bar.
I’ve just added a new system to display my members galleries in thumbnails - this will save me loads of bandwidth, but I am concerned that it puts extra demands on the server.
I am creating the thumbs when a page is requested and using send_binary file. This creates and sends the thumb to the browser. Works perfectly, but if a page consists of 100 pictures, there is a lot of processing for the server. How concerned should I be - I don’t want to upset anyone!
It would probably be better to generate the thumbnails when you add the image to the gallery.
If that isn’t an option because you just upload images to some directory, you could expand on your current thumbnail creation script to save the thumbnail result to a file as well as send it to the browser. Next time, check if the file is present (and maybe compare filedates). If the thumbnail is present and up to date, use the file.
[QUOTE=Nathan]
I am creating the thumbs when a page is requested and using send_binary file. This creates and sends the thumb to the browser. Works perfectly, but if a page consists of 100 pictures, there is a lot of processing for the server. How concerned should I be - I don’t want to upset anyone!
[/QUOTE]
I do something similar and my site serves up 40,000+ thumbnails on average every day. To my knowledge this does not cause load problems on JH’s servers, at least since I switched to ASPJPEG. However I have restricted my pages to display no more than 15 thumbnails per page.
I think you are going to have to put all the items into an array, sort by specific column and then output!
Something like:
[CODE]set fs = CreateObject(“Scripting.FileSystemObject”)
set folder = fs.GetFolder(path)
DIM arrSections(), x, file
x=0
for each file in folder
redim Preserve arrSections(2, x)
arrSections(0, x) = stuff with file path
arrSections(1, x) = stuff with file date
x=x+1
next[/CODE]
Thanks Tristan, I thought as much.
Currently, I am adding them to a record set, then using the built-in function to sort them. It just seems an un-neccessary overhead for the server though. Fortunately, I am managing to run the script only occasionally - when a new web cam image or photo is added to the gallery, so those on win5 shouldn’t notice any delay! :rolleyes:
I am now trying to futher inmpove my webcam and gallery system (to help reduce server load)
When displaying the thumbnails of the webcam, I would like to be able to save them to file, to prevent the constant use of the Server.CreateObject(“Persits.Jpeg”) object. Code as follows:
How can I check before I call the binary file to see If the thumb already exsists (and thus if it does, just show the thumb jpg), else call the binary file to make a thumbnail and save it to a ‘thumbs folder’. I can do all the programming to show the pic or make the thumb, but I’m having problems trying to get the system to detect if the thumb has already been made.