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
Asked
Active
Viewed 1,678 times
1 Answers
2
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
- 442,112
- 142
- 972
- 1,088
-
1When i uploaded an image of size 3.5 MB in the above link , this is what i got....what do you make of it Files Queued: 0 Files Uploaded: 1 Errors: 0 Current Speed: 477.33 Kbps Average Speed: 467.86 Kbps Moving Average Speed: 541.08 Kbps Time Remaining 0 s Time Elapsed 1 m 9.27 s Percent Uploaded 100.00 % Size Uploaded 3.96 MB Progress Event Count 121 – Sanjai Palliyil Jul 20 '10 at 09:40
-
@Sanjai how long does it take when you upload it to your CI site? – Pekka Jul 20 '10 at 09:42
-
@Pekka ... I took me around 1 minute to upload the same image. – Sanjai Palliyil Jul 20 '10 at 09:43
-
@Sanjai so there is no measurable difference, correct? Then it is indeed the user's connection. – Pekka Jul 20 '10 at 09:44
-
@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 Jul 20 '10 at 09:46
-
@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 Jul 20 '10 at 09:48
-
@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 Jul 20 '10 at 09:55
-
@Sanjai it could be what your application does with the image. – Pekka Jul 20 '10 at 09:57
-
@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 Jul 20 '10 at 09:59
-
@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 Jul 20 '10 at 10:04
-
@Sanjai see http://stackoverflow.com/questions/514653/what-are-the-ways-to-find-bottlenecks-in-a-web-application – Pekka Jul 20 '10 at 10:04