Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

progressbar snaping #6

Open
decryptedchaos opened this issue Sep 10, 2016 · 3 comments
Open

progressbar snaping #6

decryptedchaos opened this issue Sep 10, 2016 · 3 comments

Comments

@decryptedchaos
Copy link

This may or may not be a known issue, This happens for me on multiple browsers and multiple systems both on my site copy and your demo copy.

What is happening is the progress bars roll up to about 35-38% and then snap instantly to 100%

I've had a look around main.js but can't find anything that looks like a cause

I create a gif of what its doing for visual reference if needed

progress bar issue

@decryptedchaos
Copy link
Author

decryptedchaos commented Sep 12, 2016

I was able to work around this by changing the following code on line 125 of main.js

size = size/1024/1024/2;' to 'size = size/1024/1024/5;

Something is wrong with the math, 5 = 1/2 of 10 but /2 isn't working properly, need a better way to divide size by 2

This would break again once the file sized rolled up to the next size, so not really a viable solution

@enryIT
Copy link
Owner

enryIT commented Sep 19, 2016

The bars simply show the loaded portion of the download/upload data.
Since the test library ends the transfer when it reaches a duration of 8 seconds the bar will simply snap to 100% after 8 seconds even if the transfer hasn't finished.

A possible solution is to change the logic behind the bar filling rate, in order for it to work properly we must use the loaded/size for transfers that finish prior the 8 seconds timeout and the seconds_passed/8secs for every other test. The problem here is that we don't know if a test will lasts 8 seconds or not.

Any suggestion is appreciated.

@decryptedchaos
Copy link
Author

decryptedchaos commented Sep 19, 2016

Hmm, Yeah i don't have any ideas yet, other than not depending on time and using rather some function to detect if the transfer has ended.

But with the library using a time-based system not sure this is really possible

Alternatively, perhaps increasing the time from 8 seconds to 10-15 seconds could alleviate most of this, it should give slower connections time to complete the test natively

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants
@enryIT @decryptedchaos and others