Closed Bug 1444681 Opened 7 years ago Closed 7 years ago

download speed is severely throttled when switching to a different tab (v58 and v59 require different steps, behave differently)

Categories

(Core :: DOM: Core & HTML, defect)

59 Branch
defect
Not set
normal

Tracking

()

RESOLVED INCOMPLETE

People

(Reporter: bugsbunnyreport, Unassigned)

Details

(4 keywords)

User Agent: Mozilla/5.0 (Windows NT 6.1; Win64; x64; rv:58.0) Gecko/20100101 Firefox/58.0 Build ID: 20180206200532 Steps to reproduce: On a desktop PC with Firefox quantum 58.0.2 (64-bit): begin downloading a file. Press CTRL+J and verify the download speed is fast such as 10MB/s. Now go to a different tab to read a different website. Notice the speed slowing down until it reaches a steady rate of 1.5MB/s. If you return to the tab where you started the download, the speed returns to normal... Question: Firefox quantum is throttling the timing of inactive tabs to reduce cpu usage, is that also affecting download speeds? Actual results: I have a cable modem, 25MB/s is my verified maximum speed. I downloaded a large file such as 800MB zip file or an 1.2GB ISO. The reported speed in Firefox was 10MB/s or higher until I switched tabs, the speed got capped at 1.5MB/s unless I stayed on the tab where the download originated from. It happens every time, no matter the site or the file type. Expected results: Downloads should never be throttled.
Moving to DOM since the description points at tab throttling. I don't have a fast enough connection to repro this at home though :)
Component: Untriaged → DOM
Product: Firefox → Core
Please try to verify this bug even if your connection speed is not as fast as mine. I think you will notice a speed decrease no matter how fast your overall speed is. Pick a fast download site though, sites serving linux isos are pretty slow, they are not good as a test. The bug behaves very differently in 59.0.1 here are the new steps. Steps to reproduce: Desktop PC with Firefox 59.0.1 (64-bit): Download a large file. Press CTRL+J and verify the download speed is fast for your connection. Now open a new tab, download a large file from a different webpage (same site/domain is fine). You will have 2 large files downloading at the same time, from 2 different webpages, in 2 different tabs, and you are in tab#2. Check the download speeds again. You will see the download of file#1 has significantly slowed down for what your connection is capable of, but file#2 should be downloading just fine. Return to tab#1 where you started the download for file#1. As soon as you return to this tab, file#1 begins downloading fast again. Both your files are downloading fast now, and at approximately the same speed! I did not test beyond two downloads at a time, but I believe they will all slow down except for the most recently queued one, until you revisit the tab they were started from. Differences between v58 and v59: In firefox v58 the speed will drop as soon as you change tabs, but in v59 it only drops when starting another download. In firefox v58 you must remain on the tab your download originated from to keep it going fast. This means you can only download one or none at full speed. But in v59 once the speed of a file returns to normal by revisiting a tab, it stays at that speed no matter what. This allows you to download multiple files at full speed and is acceptable as a workaround to the bug. Actual results: Files download fast at 13MB/s for me, but are slowed down to 2MB/s by this bug. One file will be going at 13MB/s and the other going only at 2MB/s. Using the trick of revisiting the tab where the download originated from lets me download both at 13MB/s at the same time. Expected results: Downloads should never be throttled.
Summary: download speed is severely throttled when switching to a different tab → download speed is severely throttled when switching to a different tab (v58 and v59 require different steps, behave differently)
Version: 58 Branch → 59 Branch
Honza, I believe you told me we de-prioritize requests from background tabs. What do you think of this bug?
Flags: needinfo?(honzab.moz)
It would be good to know what site (URL) is loaded in the tab that, when activated, slows the download that much. We have throttling a mechanism to speed up initial page load that *only temporarily* slows down downloads (and background traffic, like large images on background tabs) when something is loading for the page in the active tab. I emphasize the word *temporarily*, the effect should be small for short times only. There could of course be a bug you have found. In Firefox 59 (current Release) there is a newer version of the throttling algorithm (bug 1444975). We've enabled that only in 61 (current Nightly) by default. Can you please try to switch to it using about:config and preference "network.http.throttle.version" set to 2? Thanks.
Flags: needinfo?(honzab.moz) → needinfo?(bugsbunnyreport)
Closing for lack of response. Please feel free to reopen with more data provided. Thanks.
Status: UNCONFIRMED → RESOLVED
Closed: 7 years ago
Flags: needinfo?(bugsbunnyreport)
Resolution: --- → INCOMPLETE
Component: DOM → DOM: Core & HTML
You need to log in before you can comment on or make changes to this bug.