Limited download speed in HTML5 app via XHR

NEW
Unassigned

Status

()

Core
DOM
3 years ago
a year ago

People

(Reporter: test7, Unassigned, NeedInfo)

Tracking

({perf})

38 Branch
x86_64
Linux
Points:
---

Firefox Tracking Flags

(Not tracked)

Details

(Reporter)

Description

3 years ago
User Agent: Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/41.0.2272.76 Safari/537.36

Steps to reproduce:

I'm developing a HTML5 app, that is downloading some large data form servers via xhr. 


Actual results:

In chrome and IE11 the data downloads pretty fast, in firefox it's much slower. I've created the simple speed check which showed me, that in firefox the download speed is about 100Mbps, and I'm testing it on 1Gpbs bandwidth.


Expected results:

It should be a lot faster

Updated

3 years ago
QA Whiteboard: [bugday-20150316]
Component: Untriaged → DOM
Keywords: perf
Product: Firefox → Core
Version: Firefox 38 → 38 Branch
Component: DOM → Networking
It can be dupe of either bug #611320 or bug #811593. Please confirm in reply.
Flags: needinfo?(test7)
(Reporter)

Comment 2

3 years ago
(In reply to Virtual_ManPL [:Virtual] from comment #1)
> It can be dupe of either bug #611320 or bug #811593. Please confirm in reply.
bug #611320: I use onprogress event, therefore not the case
bug #811593: I can't exactly understand this issue. I download files over http:// protocol, not app://.
Flags: needinfo?(test7)
Summary: Limited download speed → Limited download speed in HTML5 app via XHR
we need to tease apart the possible bottleneck sources.

1] is there an STR available?

2] can you do the transfer without xhr and compare the transfer rate? e.g. right click a link and send it to the download manager? that would help us figure out if the was a networking thing or a xhr thing

3] what platform is firefox running on and what version of the OS?

4] can we get a bit of a tcpdump or wireshark cap? We don't need the full thing, but a second or two from the middle of the transfer would help me identify whether we were bottlenecking at the tcp layer.

5] what is the rtt between the client and server? (ping time). This again goes to the amount of buffering tcp needs.

6] is this http/1 or http/2 or spdy?

thanks
(Reporter)

Comment 4

3 years ago
Thank you for your response.

1) What exactly do you mean by STR, please?
2) Download manager shows something like 36MB/s and downloads it in 1 second, via xhr its something about 5-8.
3) Windows Server 2012 R2 Standard (64b).
4) You can find these in your mailbox. 
5) 48ms
6) http/1.1
(In reply to test7 from comment #4)
> Thank you for your response.

thank you for following up with so much info.

> 
> 1) What exactly do you mean by STR, please?

Steps To Reproduce - a recipe for someone else to see the issue too.

> 2) Download manager shows something like 36MB/s and downloads it in 1
> second, via xhr its something about 5-8.

ok - that points strongly at a dom interaction of some kind. The networking code moves the data quickly and is able to signal a consumer quick enough.

You might have some kind of string manipulation or buffer growth issue. Can you provide a snippet of the relevant JS?



> 3) Windows Server 2012 R2 Standard (64b).
> 4) You can find these in your mailbox. 
> 5) 48ms
> 6) http/1.1
Component: Networking → DOM
(Reporter)

Comment 6

3 years ago
(In reply to Patrick McManus [:mcmanus] from comment #5)
> (In reply to test7 from comment #4)

> > 2) Download manager shows something like 36MB/s and downloads it in 1
> > second, via xhr its something about 5-8.
> 
> ok - that points strongly at a dom interaction of some kind. The networking
> code moves the data quickly and is able to signal a consumer quick enough.
> 
> You might have some kind of string manipulation or buffer growth issue. Can
> you provide a snippet of the relevant JS?

I have just sent you a private email with source code samples. 

Please keep them private because this is our intelectual property. Thank you for your understanding.
(Reporter)

Comment 7

3 years ago
Are there any news regarding this issue, please?
hey guys, do you remember this? I think I forwarded you the test case in email, but my attachments from that period have been purged.. It seems to be some kind of competititive bottleneck in xhr (comment 5)
Flags: needinfo?(bzbarsky)
Flags: needinfo?(bugs)

Comment 9

3 years ago
Really need some testcase here I can run. Hard to say otherwise why something isn't processed as fast it should.
What Olli said.  The mail mentioned in comment 6 has no indication as to what should be done with the files in it to reproduce the problem...
Flags: needinfo?(bzbarsky) → needinfo?(test7)
(Reporter)

Comment 11

3 years ago
I will send what is necessary in a few weeks.
Flags: needinfo?(test7)
Flags: needinfo?(mcmanus)
(Reporter)

Comment 12

3 years ago
I have responded 2 days ago and waiting on feedback. Thanks.
You need to log in before you can comment on or make changes to this bug.