tags:

views:

39

answers:

1

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
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
@Sanjai how long does it take when you upload it to your CI site?
Pekka
@Pekka ... I took me around 1 minute to upload the same image.
Sanjai Palliyil
@Sanjai so there is no measurable difference, correct? Then it is indeed the user's connection.
Pekka
@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
@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
@Pekka.. Thanks dude....
Sanjai Palliyil
@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
@Sanjai it could be what your application does with the image.
Pekka
@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
@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
@Sanjai see http://stackoverflow.com/questions/514653/what-are-the-ways-to-find-bottlenecks-in-a-web-application
Pekka
@Pekka ...anyways thanx for ur help
Sanjai Palliyil