Open Bug 1641696 Opened 4 years ago Updated 2 years ago

Firefox takes 50% more time than Microsoft Edge to display first paint of comments in reddit posts

Categories

(Core :: Networking, defect, P3)

defect

Tracking

()

Performance Impact medium
Tracking Status
firefox78 --- affected

People

(Reporter: yoasif, Unassigned)

References

()

Details

(Keywords: perf:pageload, Whiteboard: [necko-triaged])

Attachments

(3 files, 2 obsolete files)

21.43 KB, text/plain
Details
149.52 KB, image/png
Details
8.83 MB, application/octet-stream
Details

As seen on: https://www.reddit.com/r/firefox/comments/grmimf/any_chance_of_firefox_team_thinking_on_how_to/fs0burm/

Basic information

Steps to Reproduce:

  1. Navigate to: https://www.reddit.com/r/firefox/
  2. Click on comments for post "Any chance of Firefox team thinking on how to regain or retain it users through multitude of browsers across platforms looking at the rise of Edge?" (https://www.reddit.com/r/firefox/comments/grmimf/any_chance_of_firefox_team_thinking_on_how_to/)
  3. Wait for text to appear.

Expected Results:

Firefox shows text faster than Edge (or at least at the same time).

Actual Results:

Firefox shows text after after Edge.

There are two screencasts shared by users:


More information

Screenshot: (if relevant, please attach a screenshot or screencast to this bug report)

Profile URL: https://share.firefox.dev/3d7CtHP

Basic systems configuration:

OS version: Windows 10

GPU model: Nvidia GTX 1060 (3GB)

Number of cores: 4 i5-3470 @ 3.2ghz

Amount of memory (RAM): 16GB

Thanks so much for your help.

Attached file about:support

:yoasif, if you think that's a regression, then could you try to find a regression range in using for example mozregression?

Looks like the reddit comments load at around 4s in the profile.

Before/around that point there are some long-to-resolve requests in the network panel, and not a lot of CPU usage. Speculatively classifying this as Networking, but I'm not entirely sure.

Calling this [qf:pageload:p2] (p2 because it's a popular site).

Component: Performance → Networking
Whiteboard: [qf:p2:pageload]

Profiles don't provide enough information. Can you please provide a log with MOZ_LOG=timestamp,nsHttp:5,events:1 ? See https://developer.mozilla.org/en-US/docs/Mozilla/Debugging/HTTP_logging for more details how to capture it. It would also be very helpful to identify the request that loads the comments. Thanks.

Severity: -- → S3
Flags: needinfo?(yoasif)
Priority: -- → P2
Attached file log.7z (obsolete) —

Log attached. I started Firefox with a stored session that loads https://www.reddit.com/r/firefox/search?q=edge%20team&restrict_sr=1 then I clicked the link that leads to https://www.reddit.com/r/firefox/comments/grmimf/any_chance_of_firefox_team_thinking_on_how_to/

I'm not sure how to identify which request loads the comments, or at least which identifier is interesting to you.

Flags: needinfo?(yoasif)

NIing Honza in response to their request.

Flags: needinfo?(honzab.moz)

Thanks, I was deliberately waiting for more logging patches to land before asking for more information.

Aisf, you didn't modify the set of log modules to be MOZ_LOG=timestamp,nsHttp:5,events:1 so I can't see the cause of delays to requests for comments. Those seem to be XHRs to https://gateway.reddit.com/desktopapi/v1/postcomments/...

So I'll ask you to capture this again with the modified list of modules and with the Nightly build, from here. Thanks.

Flags: needinfo?(honzab.moz) → needinfo?(yoasif)
Attached file moz.zip (obsolete) —

Honza,

Attached a new log file. I started Firefox with a stored session that loads https://www.reddit.com/r/firefox/search?q=edge%20team&restrict_sr=1 then I clicked the link that leads to https://www.reddit.com/r/firefox/comments/grmimf/any_chance_of_firefox_team_thinking_on_how_to/

Thanks!

Attachment #9156012 - Attachment is obsolete: true
Flags: needinfo?(yoasif) → needinfo?(honzab.moz)

Thanks. You missed the timestamp module. That's vital.

Flags: needinfo?(honzab.moz) → needinfo?(yoasif)

Honza,

Is there a bug in about:networking? I copied and pasted the MOZ_LOG=timestamp,nsHttp:5,events:1 into the text box next to "Set Log Modules", clicked "Set Log Modules", and then started the log.

I then uploaded the file. Does that work if you try it on your machine?

Honza,

I am seeing a very strange bug after I paste MOZ_LOG=timestamp,nsHttp:5,events:1 and click the Set Log Modules button.

The current log modules shows as events:1,nsHttp:5,MOZ_LOG=timestam:0 -- for some reason it is being accepted as timestam.

I can't reproduce the issue when loading the profile via mozregression and build id 20200316154314.

Any ideas? Perhaps that is why the last two logs were unusable?

Flags: needinfo?(yoasif) → needinfo?(honzab.moz)

There may be, yes. I'll look into it.

In the meantime - maybe rather use command line arguments or environment variables?

Thank you.

Flags: needinfo?(honzab.moz) → needinfo?(yoasif)
Attached file log.7z

Honza, I hope this log helps.

Attachment #9160999 - Attachment is obsolete: true
Flags: needinfo?(yoasif) → needinfo?(honzab.moz)

(waiting for another log to be added to the code base)

See Also: → 1652083

Thanks, but, again you didn't modify the set of log modules (MOZ_LOG) to be added events:1 module. I was also waiting for some more logging added to Firefox codebase (bug 1651068).

Can you please repeat the request from Comment 12 with events:1 added?

Make sure you r Firefox Nightly is up to date!

Thanks.

Flags: needinfo?(honzab.moz) → needinfo?(yoasif)

Honza, I followed your instructions - I have no idea why it is not outputting what you want to see.

In any case, please see the new log files: https://drive.google.com/file/d/1wGpGxOTn5NiamLPhsHEYrItUJOZYETDP/view?usp=sharing

Thanks!

Flags: needinfo?(yoasif) → needinfo?(odvarko)

I see one request for comments (presumable) being delayed by about 1.5 seconds. But it is simply the server response being slow:

2020-07-16 15:07:06.843000 UTC - [Parent 14712: Socket Thread]: I/nsHttp Http2Session::ReadSegments 0000018D1D9DE000 stream=0000018D167241A0 stream send complete
2020-07-16 15:07:08.152000 UTC - [Parent 14712: Socket Thread]: I/nsHttp Http2Session::RecvHeaders 0000018D1D9DE000 stream 0x21 priorityLen=0 stream=0000018D167241A0 end_stream=0 end_headers=4 priority_group=0 paddingLength=0 padded=0

In between there are few other requests made on the same h2 session for:
https://gateway.reddit.com/desktopapi/v1/sidebar_ads?allow_over18=&include=
https://gql.reddit.com/?request_timestamp=1594912027148
https://gql.reddit.com/?request_timestamp=1594912026857
https://gql.reddit.com/?request_timestamp=1594912026857
https://gql.reddit.com/?request_timestamp=1594912027148

they all are pretty fast.

so, this could be caused by different connection coalescing strategy against edge or how we prioritize the stream(s).

Flags: needinfo?(odvarko) → needinfo?(honzab.moz)
Flags: needinfo?(honzab.moz)

CC'ing Dragana in case she can see something I can't.

Whiteboard: [qf:p2:pageload] → [necko-triaged][qf:p2:pageload]
Priority: P2 → P3
Performance Impact: --- → P2
Keywords: perf:pageload
Whiteboard: [necko-triaged][qf:p2:pageload] → [necko-triaged]
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: