Valhalla Legends Forums Archive | Web Development | Form-based File Transfer

AuthorMessageTime
iago
I'm using a form to transfer a file to a server (currently on my LAN), but I'm having a huge speed problem. Right now, we're using Apache's FileUpload class:
http://jakarta.apache.org/commons/fileupload/

but we're having horrible speed problems in it (I timed each part, and the times I'm about to give are for FileUpload.parseRequest() ONLY.
For a 1.6MB file, here are the times I calculated (3 trials each, averaged):
Internet Explorer: 21030ms
Konqueror: 3100ms
Netscape: 3070ms
Mozilla: 3111ms
Galeon: 3110ms

My question is, why is IE so much slower, and is there some way around this? I used 2 different computers and got similar results. Because most of our target audience will be using Windows with IE, this is a bit of a problem.

Any idea how to get around it? :(
February 17, 2004, 3:49 PM
hismajesty
[quote]Any idea how to get around it?[/quote]
Don't use IE. :P
February 17, 2004, 9:28 PM
Skywing
[quote author=hismajesty link=board=22;threadid=5339;start=0#msg44782 date=1077053281]
[quote]Any idea how to get around it?[/quote]
Don't use IE. :P
[/quote]
If you aren't going to give useful advice, why are you posting?
Iago specifically stated that he was stuck working with IE.
February 17, 2004, 9:59 PM
Adron
In the real application, will you still be using it on a LAN? It's possible that IE is just less effective at high speeds. Look at the network traffic and see if you can see any difference. Is the CPU used a lot? Maybe IE is inefficient encoding or deflating or whatever?
February 18, 2004, 12:02 AM
iago
[quote author=Adron link=board=22;threadid=5339;start=0#msg44809 date=1077062572]
In the real application, will you still be using it on a LAN? It's possible that IE is just less effective at high speeds. Look at the network traffic and see if you can see any difference. Is the CPU used a lot? Maybe IE is inefficient encoding or deflating or whatever?
[/quote]

It will eventually be used both on LAN and on the Internet. I'm not sure about CPU Usage, but I can check on that. I'm also not sure if it scales when the speeds are slower. Like, if it was to be used over the Internet, I'm not sure how it would be affected.

I'm thinking that the problem is with the way IE encodes it, in which case I think I'm suck with the bottle-neck.

and hismajesty - skywing is right. If you aren't going to post anything useful, don't. This is going to be a web application for schools in the city, and I really can't control who uses which browser.
February 18, 2004, 12:13 AM
crashtestdummy
I cant really help much but would you like for me to post your question on a couple of other forums and see if anyone else has a solution?
February 19, 2004, 4:41 AM
St0rm.iD
Did you change the form's encoding property?
February 19, 2004, 1:50 PM
iago
[quote author=crashtestdummy link=board=22;threadid=5339;start=0#msg44995 date=1077165665]
I cant really help much but would you like for me to post your question on a couple of other forums and see if anyone else has a solution?
[/quote]
If you don't mind. It's not too big of a deal, but it would be nice to know


Storm-id - It's ENCTYPE="multipart/form-data". Isn't that what it has to be for file transfer to work?
February 19, 2004, 2:28 PM
St0rm.iD
Just making sure...was thinking internet explorer might have defaulted to something non-standard?
February 19, 2004, 11:08 PM
Myndfyr
[quote author=St0rm.iD link=board=22;threadid=5339;start=0#msg45097 date=1077232113]
Just making sure...was thinking internet explorer might have defaulted to something non-standard?
[/quote]

Perhaps there is a different way that IE encodes multipart/form-data....

Are you using a Linux/Unix box to host Apache? All the other browsers are Linux-aware, and so perhaps the other browsers (when the get the server ID) encode the form-data (in base64) in big-endian, IE encodes base64 in little-endian, and the server, recognizing IE's gayness, has to convert?

I could be off.... I seem to remember Linux being big-endian, but now I'm having conflicting thoughts about only Motorola being big-endian.....

Perhaps there is a different base64 encoding method? Would it be possible to packetlog this and look at the different encoding methods?
February 20, 2004, 2:17 AM
iago
[quote author=Myndfyre link=board=22;threadid=5339;start=0#msg45117 date=1077243443]
[quote author=St0rm.iD link=board=22;threadid=5339;start=0#msg45097 date=1077232113]
Just making sure...was thinking internet explorer might have defaulted to something non-standard?
[/quote]

Perhaps there is a different way that IE encodes multipart/form-data....

Are you using a Linux/Unix box to host Apache? All the other browsers are Linux-aware, and so perhaps the other browsers (when the get the server ID) encode the form-data (in base64) in big-endian, IE encodes base64 in little-endian, and the server, recognizing IE's gayness, has to convert?

I could be off.... I seem to remember Linux being big-endian, but now I'm having conflicting thoughts about only Motorola being big-endian.....

Perhaps there is a different base64 encoding method? Would it be possible to packetlog this and look at the different encoding methods?
[/quote]

That's a good idea, I *think* I can packetlog there.
February 20, 2004, 1:07 PM
St0rm.iD
Does endianness even matter when using base64?
February 20, 2004, 2:29 PM
iago
I just did a demo for my boss, using windows/mozilla and windows/ie, and the difference was 3 seconds versus 57 seconds. Now we're wondering why. I'll break out a packetlogger this afternoon, see if that tells me anything.
February 20, 2004, 6:00 PM
Kp
[quote author=Myndfyre link=board=22;threadid=5339;start=0#msg45117 date=1077243443]I could be off.... I seem to remember Linux being big-endian, but now I'm having conflicting thoughts about only Motorola being big-endian.....[/quote]

While it is not out of the question that Linux could be made to run on (and might already be available for) big endian architectures, it also runs on Intel/AMD chips, which are little endian.

Iago: when you do the packet log, be sure to take a reading of CPU usage over the same period as the packet log, so you can see how much CPU is being used before/during the transfer. From the extreme delay times, I suspect you're going to find that it's using very little CPU time (and is instead just snoozing while it's supposed to be working). Why it would do that, I don't know. However, I can't see anyone coming up with native code so inefficient that it could take 57 seconds to do the work that other browsers are doing in 3.

[Edit: word change.]
February 20, 2004, 7:51 PM
crashtestdummy
this might be a dumb question but did you try the bug query page
http://nagoya.apache.org/bugzilla/query.cgi
February 21, 2004, 6:45 AM

Search