TalkPHP

TalkPHP (http://www.talkphp.com/forums.php)
-   General (http://www.talkphp.com/general/)
-   -   Image Upload Speed (http://www.talkphp.com/general/5811-image-upload-speed.html)

captainmerton 03-14-2011 10:39 AM

Image Upload Speed
 
I have a very general query hope someone can help me with. I have built image upload functionality into a website i run in the form of an image upload html form. I use PHP Image GD or whatever its called and add the images to an image folder while storing the relevant detail on a mysql database. I have also added a 1Mb file limit on any uploads. On my own windows laptop this image upload process takes a few seconds however on my actual live website it can take anything up to 10 seconds. I've added a javascript "image loading" image just to keep my users sane. before i contact my hosting company any ideas what specifcally would make this slow. is it a bandwidth issue, webspace issue, RAm issue? Any help much appreciated.

wGEric 03-21-2011 09:03 PM

It is the upload speed of your internet connection that would be causing the slow down. Nothing you can do to speed it up in your code/server. Unless your server's connection is slow but that is unlikely.

captainmerton 03-22-2011 10:10 AM

Sometimes in terms of displaying the actual webpage its slow i.e. the page appears then the pictures appear slowly. Would this be down to the server?

wGEric 03-22-2011 05:41 PM

It could be. What is your connection speed?

captainmerton 03-22-2011 06:31 PM

What i am trying to understand is I have a website where i allow users to upload images. The images are loaded into a file on the server and i store all the required additional information on a mysql table. However the images can be anything up to 1mb. I feel the website is starting to slow in its performance i,e, when i view a page the images seem to take a little longer to appear. Just trying to understand surely at some point the server is processing display of these images does the RAM need to be bigger?

wGEric 03-29-2011 12:23 AM

Are you resizing the images or doing any processing on them? If so, make sure that code runs when users upload images. That way the image gets processed once instead of getting processed at every request.

If the images aren't going through any PHP when being displayed then the server is just taking some time to process the requests or your internet connection speed isn't fast enough to download everything as quickly as you would like.

captainmerton 03-29-2011 08:33 AM

So the users pick an image from their desktop using a standard html form then when they submit the form there is php code that resizes the image then saves it down to a folder on my hosted webspace then a mysql table is updated with the relevant image detail like the file location etc. I have a 1Mb size restriction on the images and i've noticed that when i upload smaller images the time taken is pretty short. Any guidance on handling image sizes? I guess if users keep uploading 1Mb images my site is going to get slow in terms of displaying those images?


All times are GMT. The time now is 05:44 AM.

Powered by vBulletin® Version 3.6.8
Copyright ©2000 - 2013, Jelsoft Enterprises Ltd.
Search Engine Optimization by vBSEO 3.1.0