Page MenuHomePhabricator

Calculate remaining time when uploading
Closed, ResolvedPublic

Description

Author: diaa_abdelmoneim

Description:
Could there be an "Elapsed time:" and "Estimated time remaining:" in the dialogue box? Based on how fast each chunk is uploaded this should be calculable. A speed indicator would also be helpful.


Version: unspecified
Severity: enhancement

Details

Reference
bz21862

Event Timeline

bzimport raised the priority of this task from to Medium.Nov 21 2014, 10:53 PM
bzimport added a project: mwEmbed-Firefogg.
bzimport set Reference to bz21862.

mdale wrote:

This may be a good quick intro bug for Neil. To give you a quick pointer you will want to look at mvBaseUpload.js & the updateProgress / updateProgressWin functions. These files are presently in the js2-work branch: http://svn.wikimedia.org/svnroot/mediawiki/branches/js2-work/phase3/js2/mwEmbed

diaa_abdelmoneim wrote:

Could u cc neil so he would see it ?

mdale wrote:

He apparently does not yet have an email address in the Bugzilla system. I will request that he gets that taken care of.

I added Guillaume should be helping tracking and assign media/commons related bugs.

neilk wrote:

Just assigned it to myself.

neilk wrote:

OK, so, there wasn't really a spec on what it's supposed to look like, so I'm making one up:

----------------------- Progress bar ---------------------------

Percentage uploaded: N% Estimated time remaining HH:MM:SS

I don't want to clutter the progress bar unnecessarily with three or four updating items. I'm going to assume the user really cares about when it will be done. The ideal thing is probably a display of when it will be done in local time conventions (like, "Finished around: 7:15pm"). As far as I know, neither JS nor jQuery gives us an easy human readable way to do that, so let's do the easy thing and just guestimate time remaining for now in HH:MM:SS.

Elapsed time and upload speed are more about troubleshooting problems. Let's set that aside for now. Obviously we will be tracking those internally, but maybe this could be info you could pop up, in a small link like "Upload stats", to get:

  • Date.toLocaleString() of the time we started the upload
  • elapsed time so far
  • estimated time remaining
  • Date.toLocaleString() of the time we estimate finishing the upload
  • Average Kb/Seconds.

But, let's call that a nice-to-have for now.

At this moment I'm not sure what I want to do about multiple queued uploads, but I'm just starting to get the hang
of how this is all put together.

neilk wrote:

Oh, also: Time remaining is probably only necessary if the upload lasts longer than a few seconds.

And the percentage upload is redundant with the displayed bar and could be eliminated, (unless this is somehow more accessible)?

mdale wrote:

I like to keep the visual progress bar. I would recommend just just swapping the text percentage for estimated time remaining. If its easy to do maybe put the text percentage inside the progress bar.

I would not worry about multiple queue items until we get the multiple file upload system working better.

There are lots of other bugs and areas for improvement that could be focused on so definitely don't worry about exposing all the info or spending too much more time on this bug.

neilk wrote:

Fixed in a sort of hacky way in revision #62206. Not as elaborate as my comments above.

A better way to do this is forthcoming.

Dummy edit to get the handy link: r62206