in reply to 2 Questions on Images and Mod_perl mem usage
Hi,
Erm, you should use thumbnails, for every photo uploaded you make a small thumbnail on the way. I recommend you not doing resizing on the fly when a person is viewing the page, because it's slow once you have a lot of pages/users. On the other side if you have a photo of 2mb, and you show this image on a <img> defining smaller width and height, the server send the 2mb size image to the client, and the browser will do the "scaling"... Take a look at projects around treating the same situation.
Imager and Image::Magick are great modules for doing all this kind of stuff (changing images and so).
I have seen other approaches instead of creating and managing the thumbnails, was using Mason caching the thumbnails, so the first time it takes a few ms. more but once you have a cached thumbnail, it's like having the file normally around on your filesystem. See here.
I can't tell you if this is normal, since I don't see your code, but normally you can do some optimisations... ;-)
I think that you should write clean code, since memory is cheap, and today there is no problem to have 512mb or 1024mb on your webserver. Using mod_perl: than more memory than better.
Regards,
|fire| at irc
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: 2 Questions on Images and Mod_perl mem usage
by Anonymous Monk on Jul 02, 2005 at 00:30 UTC | |
by fmerges (Chaplain) on Jul 02, 2005 at 00:44 UTC | |
by Anonymous Monk on Jul 02, 2005 at 00:53 UTC | |
by BUU (Prior) on Jul 02, 2005 at 01:10 UTC | |
by fmerges (Chaplain) on Jul 02, 2005 at 01:13 UTC | |
|
Re^2: 2 Questions on Images and Mod_perl mem usage
by jimX11 (Friar) on Jul 02, 2005 at 15:09 UTC |