I am using codeigniter for my project and the file upload is taking a lot of time in server. When a user uploads images of size above 3 MB, its taking more than 1 minute to upload. Is there any way to speed up file upload process or does it depend upon the net connection being used
+1
A:
In a normal scenario, upload speed mainly on the user's connection speed. Most Internet connections are slower uploading than downloading.
You could try out SWFUpload's Speed Plugin Demo to find out whether it's the connection, or whether it's really the server taking a lot of time to process the uploaded data. In the latter case, you would have to provide more information about what your script does.
Pekka
2010-07-20 09:05:05
When i uploaded an image of size 3.5 MB in the above link , this is what i got....what do you make of itFiles Queued: 0Files Uploaded: 1Errors: 0 Current Speed: 477.33 KbpsAverage Speed: 467.86 KbpsMoving Average Speed: 541.08 KbpsTime Remaining 0 sTime Elapsed 1 m 9.27 sPercent Uploaded 100.00 %Size Uploaded 3.96 MBProgress Event Count 121
Sanjai Palliyil
2010-07-20 09:40:38
@Sanjai how long does it take when you upload it to your CI site?
Pekka
2010-07-20 09:42:24
@Pekka ... I took me around 1 minute to upload the same image.
Sanjai Palliyil
2010-07-20 09:43:59
@Sanjai so there is no measurable difference, correct? Then it is indeed the user's connection.
Pekka
2010-07-20 09:44:32
@Pekka....i agree too...but generally speaking, is there any way to improve the performance of file upload. Client insist upon increasing performance...!!!!!
Sanjai Palliyil
2010-07-20 09:46:57
@Sanjai nope. Except for compressing the data before sending (useless for JPG images though, they are already compressed) and of course getting a faster connection. What I have done in situations like that is set up a local mirror of the site at the client's site, and build an uploading mechanism that mirrors the site daily. A *huge* undertaking, of course.
Pekka
2010-07-20 09:48:41
@Pekka.. Thanks dude....
Sanjai Palliyil
2010-07-20 09:51:27
@Pekak... now when i uploaded an image of size 1 MB it took me only 7.75 seconds while the same image took 33 sec in my CI application. what could be the problem
Sanjai Palliyil
2010-07-20 09:55:38
@Sanjai it could be what your application does with the image.
Pekka
2010-07-20 09:57:33
@Pekka ... i upload the image using CI's upload library and resize the image using the image manipulation library....thats all am doing...not sure what the issue is
Sanjai Palliyil
2010-07-20 09:59:10
@Sanjai I don't know - it could be that the resizing takes that much time, although it's unlikely. You may have to do some profiling to find out what takes that much time.
Pekka
2010-07-20 10:04:07
@Sanjai see http://stackoverflow.com/questions/514653/what-are-the-ways-to-find-bottlenecks-in-a-web-application
Pekka
2010-07-20 10:04:36
@Pekka ...anyways thanx for ur help
Sanjai Palliyil
2010-07-20 10:04:59