Open Bug 1406958 Opened 7 years ago Updated 2 years ago

Stopped network requests block the active ones when throttling is enabled

Categories

(DevTools :: Netmonitor, defect, P3)

58 Branch
defect

Tracking

(firefox57 fix-optional)

Tracking Status
firefox57 --- fix-optional

People

(Reporter: pbasista, Unassigned)

References

(Blocks 1 open bug, )

Details

User Agent: Mozilla/5.0 (X11; Linux x86_64; rv:58.0) Gecko/20100101 Firefox/58.0
Build ID: 20171009100134

Steps to reproduce:

Go to https://jsfiddle.net/7u5h2Ldk/24/ and open the network monitor (Ctrl+Shift+E). Then enable any kind of network throttling (currently found as a drop-down menu in the responsive design mode).

Use the buttons to start and stop the large image from loading.


Actual results:

When the image loading is stopped, the request is not stopped immediately. Instead, all the response data, which has been cached so far by the Firefox network throttling layer, will continue to load (at the throttled speed). That may block the subsequent requests from starting, which significantly influences the behavior of some web applications.


Expected results:

The network requests should have been stopped immediately when the image loading was stopped. The remaining response data, which has been cached so far by the Firefox network throttling layer, should have been discarded.

The correct behavior can be observed without the network throttling enabled or when the amount of data already cached by the Firefox network throttling layer is sufficiently small.
Component: Untriaged → Developer Tools: Netmonitor
Thanks for filing!

I am not sure I fully understand the problem you are reporting.  When you say:

> When the image loading is stopped, the request is not stopped immediately.

do you mean "stopped" by clearing src?  

Also, how are you determining "will continue to load (at the throttled speed)"?  From the network monitor request list?  Something else?
Flags: needinfo?(pbasista)
> do you mean "stopped" by clearing src?
Yes, but the actual way of stopping the request is not important. It can be stopped by any other means (e.g. aborting the XMLHttpRequest) and the resulting throttling-related behavior will, from my experience, be the same.

> Also, how are you determining "will continue to load (at the throttled
> speed)"?  From the network monitor request list?  Something else?
Mainly from the network monitor. I *assume* that the request is not complete if its Status, Transferred and Size columns are empty. If my assumption is not correct, there is still a simpler way to tell: the new requests would not start. I do not have an example to demonstrate that, but I can create it if needed.
Flags: needinfo?(pbasista)
Okay, I believe I am following the problem now.

I found it a bit easier to test on the embedded version of the demo page:

https://jsfiddle.net/7u5h2Ldk/24/embedded/result/
Status: UNCONFIRMED → NEW
Ever confirmed: true
Product: Firefox → DevTools
Severity: normal → S3
You need to log in before you can comment on or make changes to this bug.