Welcome Guest! You need to login or register to make posts.

Notification

Icon
Error

Options
Go to last post Go to first unread
shaun_mcquaker  
#1 Posted : Friday, June 22, 2007 4:48:39 AM(UTC)
shaun_mcquaker

Rank: Member

Groups: Member
Joined: 6/12/2007(UTC)
Posts: 28

I'm finding that the default progress bar in the Image Uploader 4.5 does not accurately reflect the total time it takes to upload a file. It appears to quickly upload the file and then hangs for a while, especially with larger files. What exactly does the default progress bar calculate? Time to send the form and receive an answer from the server? Is there a way to modify the default progress bar to better reflect the time it takes to upload?

Thanks,
Shaun
Alex Makhov  
#2 Posted : Sunday, June 24, 2007 12:45:13 PM(UTC)
Alex Makhov

Rank: Advanced Member

Groups: Member
Joined: 8/3/2003(UTC)
Posts: 998

Hello,

There is a smart time counting mechanism used to show the total progress. The only one thing it does not put into account is the upload script processing time.
Sincerely yours,
Alex Makhov

UserPostedImage Follow Aurigma on Twitter!
shaun_mcquaker  
#3 Posted : Sunday, June 24, 2007 10:43:51 PM(UTC)
shaun_mcquaker

Rank: Member

Groups: Member
Joined: 6/12/2007(UTC)
Posts: 28

So is there a way to take script processing into account or at least keep the progress bar ticking until it has received a response from the server? Can this be done using a custom progress bar?

Thanks,
Shaun
shaun_mcquaker  
#4 Posted : Monday, June 25, 2007 11:15:38 PM(UTC)
shaun_mcquaker

Rank: Member

Groups: Member
Joined: 6/12/2007(UTC)
Posts: 28

The method by which progress is shown right now clearly needs modification. For instance when uploading large images or video, the progress bar quickly (in a matter of seconds) moves to the end of the box and then hangs. This does not result in a very good user experience as they have no idea if their upload is progressing or not.

Shaun
shaun_mcquaker attached the following image(s):
waiting.JPG
Alex Makhov  
#5 Posted : Monday, July 2, 2007 1:49:35 PM(UTC)
Alex Makhov

Rank: Advanced Member

Groups: Member
Joined: 8/3/2003(UTC)
Posts: 998

Hello,

We know about this issue and we have made some changes regarding it:
- there is an ability to customize the ProgressDialogWaitingForResponseFromServerText property value;
- last uploaded item is shown on the progress dialog while upload is processed.
These changes have been implemented a long time ago and there are no new features regarding the long waiting of upload processing now.

Edited by user Monday, February 25, 2008 6:04:43 PM(UTC)  | Reason: Not specified

Sincerely yours,
Alex Makhov

UserPostedImage Follow Aurigma on Twitter!
shaun_mcquaker  
#6 Posted : Monday, July 2, 2007 11:10:56 PM(UTC)
shaun_mcquaker

Rank: Member

Groups: Member
Joined: 6/12/2007(UTC)
Posts: 28

These modifications don't address the core issue however. Giving the user a message does nothing to really explain to them what is happening. It seems to me that you are not using blocking IO when writing the files to the server. Is this possible?
Alex Makhov  
#7 Posted : Monday, July 9, 2007 1:49:25 PM(UTC)
Alex Makhov

Rank: Advanced Member

Groups: Member
Joined: 8/3/2003(UTC)
Posts: 998

Hello,

Image Uploader does not write files to the server as you understand. It only uploads it to the upload script such as upload.php or upload.asp and different upload scripts could work differently with different processing time. Image Uploader uploads data and waits until upload processing script finishes upload processing and this upload processing time could differ from each other. Image Uploader is unable to check how much time could it take to process files on the server side.
Sincerely yours,
Alex Makhov

UserPostedImage Follow Aurigma on Twitter!
shaun_mcquaker  
#8 Posted : Monday, July 9, 2007 10:24:19 PM(UTC)
shaun_mcquaker

Rank: Member

Groups: Member
Joined: 6/12/2007(UTC)
Posts: 28

Yes I realize that you are write a HTTP POST request to the server and the script then writes the file to the server drive. But when analyzing the packets being sent to the server and comparing that with the progress bar they do not match. My PC is still sending packets to the server when your progress bar indicates the file has been sent, this is wrong! The server isn't processing it yet, it hasn't even received it. I can verify that by checking the running processes on the server and the script to handle the image isn't even running. There is absolutely no way that it takes 10 seconds to upload 100MB across a DSL connection! Plain and simple.

What Java package do you use to create and send the HTTP POST? Apache HTTPClient?

By the way, I love the product and this is really the only small annoyance with it!

Shaun
Alex Makhov  
#9 Posted : Tuesday, July 10, 2007 1:37:19 PM(UTC)
Alex Makhov

Rank: Advanced Member

Groups: Member
Joined: 8/3/2003(UTC)
Posts: 998

Hello,

Yes, we are using Apache HTTPClient as an upload library (you could find this information in the documentation).
OK, let me describe how data upload and progress is processed. Server sends the requests one by one for the next part of data. The data to be uploaded is copied to the buffer part by part and according to the part of data send the progress bar is updated. So the progress depends on the amount of data sent to the server. As about the correlation of upload process and upload processing I think it depends on the server. IIS with ASP, IIS with ASP.NET and Apache with PHP could process data in parallel with upload process or just after upload completion; it depends on particular server realization. Your results of testing are not universal, there could be another results on another servers. So the only universal way to show the progress of the upload process is to show how much data is sent to the server.
Sincerely yours,
Alex Makhov

UserPostedImage Follow Aurigma on Twitter!
shaun_mcquaker  
#10 Posted : Monday, July 16, 2007 12:32:17 AM(UTC)
shaun_mcquaker

Rank: Member

Groups: Member
Joined: 6/12/2007(UTC)
Posts: 28

Hi Alex,

Thanks for your reply. I understand that you write chunks to the output stream as the server requests it. However this does not appear to be what is happening. My current configuration is that I don't upload the source file but rather a resized version of the image. Is it possible that when uploading a resized image it does not upload in chunks but rather buffers the whole file and thus updates the progress bar quickly, as the file is being buffered opposed to being sent?

If this problem is due to a server side issue can you point me in the direction of some server documentation that would resolve this issue? We are running Apache 2.0.52.

Thanks a lot!
Shaun
Alex Makhov  
#11 Posted : Tuesday, July 17, 2007 7:55:37 PM(UTC)
Alex Makhov

Rank: Advanced Member

Groups: Member
Joined: 8/3/2003(UTC)
Posts: 998

Hello,

It’s always interesting to talk to such a professional. I am going to visit Singapore next month, do you have a business plans there? ... Joke :) But I really am going to visit Singapore and Bali at the beginning of Augist on my honeymoon.
When Image Uploader creates a thumbnail to be uploaded it saves this thumbnail as a file to hard drive to avoid problems with memory. After that all the files are mapped while upload process is going on. So there is no difference between original file (which is mapped too) and thumbnail file.
As about the server part issues, I’m not good in this question so I have no advices about what to read. As I know it depends on particular web-server type, how uploaded files are processed and when upload result page is returned to the client.
Sincerely yours,
Alex Makhov

UserPostedImage Follow Aurigma on Twitter!
shaun_mcquaker  
#12 Posted : Wednesday, July 18, 2007 2:25:59 AM(UTC)
shaun_mcquaker

Rank: Member

Groups: Member
Joined: 6/12/2007(UTC)
Posts: 28

Alex,

Congratulations on your marriage and honeymoon! I've never been to Singapore and don't have any plans to go. :) I've heard it's very nice though!

As for the upload feature ... I'm assuming in the Java version that to upload the file you extend the PartBase class (from Apache HttpClient) and use a FilePartSource to wrap the image file. I would then assume that you override the sendData method (in your PartBase derived class), and then call the outputstream.write() method with a byte array of fixed length (say 4096). This write should be synchronous. I'm also assuming that after every write in the sendData method you update the progress bar. So as you write each chunk of the file the progress bar is updated. So my question ... is it possible that the Parts for Description, FileSize, etc. are updating the progress bar, i.e. in their sendData methods they are making a method call that is updating the progress bar. I guess more generally my question can be stated as "is the progress bar ONLY being updated in the sendData method for the class that wraps the image file (FilePartSource)?" This can be the only thing I can think of if I am to assume that sendData is writing synchrously, which I think it is.

Shaun
shaun_mcquaker  
#13 Posted : Wednesday, July 18, 2007 3:22:26 AM(UTC)
shaun_mcquaker

Rank: Member

Groups: Member
Joined: 6/12/2007(UTC)
Posts: 28

Alex,

Just came across something interesting regarding the progress bar issue. I tried uploading a large file using the Safari and Firefox browsers on MAC, and the progress bar worked perfectly! This must somehow be a Windows issue! It's not a server issue because I was uploading to the same server. Any ideas? I am using JRE 1.5.0_07 on my MAC. I tried using JRE 1.5 on Firefox in Windows but the progress bar moved quickly to the end and hung there until the file was completely uploaded.

Shaun
Alex Makhov  
#14 Posted : Wednesday, July 18, 2007 11:36:26 AM(UTC)
Alex Makhov

Rank: Advanced Member

Groups: Member
Joined: 8/3/2003(UTC)
Posts: 998

Hello,

You are almost completely right about the uploading process. There is one advantage of this simple upload firing mechanism. We have optimized the calls of Progress event handler while the data is uploaded. Progress event handler is called only when percentage value of full upload process is changed. Before this feature implementation upload process was very slow because of lots of Progress event handler calls. We have optimized these calls and now upload is fast enough. As about PartBase, there are several subclasses of this class to store files and textual data such as descriptions. All of these subclasses call Progress event handler.
Sincerely yours,
Alex Makhov

UserPostedImage Follow Aurigma on Twitter!
shaun_mcquaker  
#15 Posted : Thursday, July 19, 2007 5:32:20 AM(UTC)
shaun_mcquaker

Rank: Member

Groups: Member
Joined: 6/12/2007(UTC)
Posts: 28

Alex,

Okay so your upload progress event handler knows how big each file is (including associated meta data) and updates the progress bar based on the amount sent through the outputstream. Do you have any idea why this work work fine on MAC and not Windows? I currently have HTTP authentication turned on, so you have to enter a username and password when uploading, could this be causing the problem?

Shaun
Alex Makhov  
#16 Posted : Thursday, July 19, 2007 7:13:31 PM(UTC)
Alex Makhov

Rank: Advanced Member

Groups: Member
Joined: 8/3/2003(UTC)
Posts: 998

Hello,

May be the reason is in HTTP authentication. In some cases it looks like the data uploaded twice. At the first time the server only requests the data but there is no real upload. After that the data is requested again.
Sincerely yours,
Alex Makhov

UserPostedImage Follow Aurigma on Twitter!
shaun_mcquaker  
#17 Posted : Friday, July 27, 2007 3:04:49 AM(UTC)
shaun_mcquaker

Rank: Member

Groups: Member
Joined: 6/12/2007(UTC)
Posts: 28

Alex,

I've released the uploader on our site TravelPod.com which has no HTTP authentication and the progress bar issue still persists. So I guess it's not the HTTP authentication.

Shaun
shaun_mcquaker  
#18 Posted : Friday, July 27, 2007 4:20:37 AM(UTC)
shaun_mcquaker

Rank: Member

Groups: Member
Joined: 6/12/2007(UTC)
Posts: 28

Alex,

I just tried the uploader with Netscape 9.0b2 and the progress bar worked fine! So this is a browser issue with IE and Firefox. Any idea what it could be about these browsers that is causing this problem with the progress bar? Is the progress bar a Java/ActiveX GUI component or a browser controlled component?

Shaun
shaun_mcquaker  
#19 Posted : Wednesday, August 15, 2007 3:58:14 AM(UTC)
shaun_mcquaker

Rank: Member

Groups: Member
Joined: 6/12/2007(UTC)
Posts: 28

Okay so I figured this one out. It was being caused by the McAfee personal firewall. You can't just disable it from the McAfee control panel you have to actually stop the McAfee Personal Firewall Service. Thanks for all your help!

Cheers,
Shaun
Users browsing this topic
Similar Topics
Upload progress bar (Discussions – HTML5/Flash Uploader)
by Adams 2/9/2015 10:12:59 PM(UTC)
INFO: Antivirus software causes freezing progress bar (FAQ – ActiveX/Java Uploader)
by Tamila 6/10/2009 9:00:43 PM(UTC)
How to remove PREPARE step from progress bar (Discussions – ActiveX/Java Uploader)
by michalsz 11/6/2008 9:07:53 PM(UTC)
No Progress Bar in IE and No Upload Progress in Firefox on PC (Discussions – ActiveX/Java Uploader)
by hyperlinked 8/6/2008 11:40:46 PM(UTC)
Default Progress Bar BackGround color (Discussions – ActiveX/Java Uploader)
by Jyotindra 7/7/2008 4:48:22 PM(UTC)
Image Uploader progress bar goes blank in IE (Discussions – ActiveX/Java Uploader)
by JatinGala 6/11/2008 5:50:42 PM(UTC)
Installation Progress Bar For The Client Side when first installing (Image Uploader)
by Beanie Man 7/17/2007 7:57:01 AM(UTC)
progress bar (Discussions – ActiveX/Java Uploader)
by chrisfoto 4/15/2007 5:29:38 PM(UTC)
about progress bar,delete button ,uploading path using ImageUploader2.5 (Discussions – ActiveX/Java Uploader)
by sak 7/3/2004 6:20:00 PM(UTC)
issue with progress bar (Image Uploader)
by sasi 3/12/2004 8:24:00 AM(UTC)
Forum Jump  
You cannot post new topics in this forum.
You cannot reply to topics in this forum.
You cannot delete your posts in this forum.
You cannot edit your posts in this forum.
You cannot create polls in this forum.
You cannot vote in polls in this forum.