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

Browser locks while loading Lodash docs #45

Closed
calvinf opened this issue Sep 1, 2016 · 16 comments
Closed

Browser locks while loading Lodash docs #45

calvinf opened this issue Sep 1, 2016 · 16 comments
Labels

Comments

@calvinf
Copy link

calvinf commented Sep 1, 2016

When I load the Lodash docs, my browser freezes for several seconds.

Repro steps:

  • Navigate to docs from Lodash homepage (click Documentation link)
  • Browser (Firefox 48.0.1) freezes for a few seconds
  • Switch versions (to 3.10.1 or 2.4.2)
  • Browser freezes for a few seconds

Something about how the docs are being loaded is slowing things down. I haven't had time to dig in and find out why.

@jdalton
Copy link
Member

jdalton commented Sep 2, 2016

It looks CSS related but not sure what's causing it (there's plenty of places for it to buckle down on).

@calvinf
Copy link
Author

calvinf commented Sep 2, 2016

In glancing through the JS, it may be related to initializing React state
by parsing the DOM. The selectors could be more efficient, and some
debouncing may avoid it locking up. Not sure if that's root cause but
something to check.
On Thu, Sep 1, 2016 at 6:09 PM John-David Dalton notifications@github.com
wrote:

It looks CSS related but not sure what's causing it (there's plenty of
places for it to buckle down on).


You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
#45 (comment),
or mute the thread
https://github.com/notifications/unsubscribe-auth/AACdNX-CnTerfVUC2vy7m01bqgIWoVkWks5ql3dIgaJpZM4JzOtZ
.

@jdalton
Copy link
Member

jdalton commented Sep 2, 2016

If I remove all JS on the page it still locks up. If I remove the CSS the page loads w/o locking up.

@jdalton jdalton added the wontfix label Sep 2, 2016
@jdalton
Copy link
Member

jdalton commented Sep 2, 2016

If you come up with anything let me know.
For now it's just one of those things I hope gets better with time.

@ivan-kolmychek
Copy link

Just stumbled upon the same issue, disabling the CSS helps.

From quick "performance" run that I was able to do in Firefox, it spends a lot of time in styles.

@ivan-kolmychek
Copy link

ivan-kolmychek commented Sep 6, 2016

Here is a screenshot of profile with just single page reload.

screenshot_20160906_190453

I had lodash docs page already opened with CSS enabled, I've started the performance recording and just reloaded the page.

@jdalton
Copy link
Member

jdalton commented Sep 6, 2016

\cc @bzbarsky

@zackhall
Copy link
Contributor

zackhall commented Sep 6, 2016

My initial thought was similar to @calvinf's: maybe initializing the react state by reading, parsing the DOM was locking it up and retriggering layouts.

However, it's heavy layout cycles of 40-80ms causing this that are triggered before the initial render from docs.js.

In screenshot below, initial evaluation of the javascript is the blue bar, and sub-details, on the right. The layouts are the purple blocks.

image

@bzbarsky
Copy link

bzbarsky commented Sep 7, 2016

@bzbarsky
Copy link

bzbarsky commented Sep 7, 2016

And in particular, it's something about the combination of flex from main.css and something the fontawesome stylesheet is doing that causes the slowdown in Firefox. Not clear what yet.

@jdalton
Copy link
Member

jdalton commented Sep 7, 2016

@bzbarsky Thank you so much for digging into this!

@bzbarsky
Copy link

bzbarsky commented Sep 7, 2016

@jdalton Thanks for letting me know about it!

@linonetwo
Copy link

It's getting slow again! In chrome.

@jdalton
Copy link
Member

jdalton commented May 9, 2018

Nothing has changed on our end. If you think it's a Chrome regression you're better off filing the bug with Chrome since I'm not going to do any work on this.

@bbottema
Copy link

@jdalton, It's become completely unusable for me. Locks up for a minute.

@jdalton
Copy link
Member

jdalton commented Jun 12, 2018

I've got nothing actionable here, sorry. The source hasn't changed so unless you investigate and create a PR the situation will likely not improve for you.

I'm locking the thread since "met too" comments without a patch or further info don't really help. I've visited the docs in Chrome plenty of times and have never had a problem. I checked with Firefox 60.0.2 and it loads quick too.

@lodash lodash locked and limited conversation to collaborators Jun 12, 2018
@jdalton jdalton removed the wontfix label Jun 12, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Development

No branches or pull requests

7 participants