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

x/pkgsite: large module pages are very slow to render #51564

Open
deltamualpha opened this issue Mar 9, 2022 · 4 comments
Open

x/pkgsite: large module pages are very slow to render #51564

deltamualpha opened this issue Mar 9, 2022 · 4 comments
Labels
NeedsInvestigation pkgsite UX

Comments

@deltamualpha
Copy link

@deltamualpha deltamualpha commented Mar 9, 2022

The datadog-api-client-go packagesite page is... enormous. The raw HTML over the wire from the server is over 21MB, and rendering performance is abysmal. It can take up to 25 seconds for the page to become fully responsive to input. Obviously, this is an outlier package, but even given that, there seems like plenty of room here for performance work.

I fired up the Chrome performance tooling to see if there was something obvious:

Screen Shot 2022-03-09 at 10 15 49 AM

Nearly all the time is spent in "Recalculate Style", presumably because the browser is constantly re-flowing the page as more and more HTML gets thrown at it?

What is the URL of the page with the issue?

https://pkg.go.dev/github.com/DataDog/datadog-api-client-go@v1.10.0/api/v1/datadog

What is your user agent?

Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/99.0.4844.51 Safari/537.36

Screenshot

No rendering error, so screenshot isn't useful.

What did you do?

Load the page.

What did you expect to see?

Reasonable page-load times

What did you see instead?

An extremely-long rendering block.

@deltamualpha
Copy link
Author

@deltamualpha deltamualpha commented Mar 9, 2022

One previous issue I could find; #38892. Scale of concern there is completely different, however.

@gopherbot gopherbot added this to the pkgsite/unplanned milestone Mar 9, 2022
@deltamualpha
Copy link
Author

@deltamualpha deltamualpha commented Mar 10, 2022

As mentioned in #50911, https://pkg.go.dev/golang.org/x/sys/windows suffers from interaction slowdowns, although that page is a mere 3.5MB.

@jamalc jamalc added UX NeedsInvestigation labels Mar 14, 2022
@jamalc
Copy link

@jamalc jamalc commented Mar 14, 2022

/cc @jinhongy @fflewddur @jba

I think we originally limited documentation size to 10MB for this kind of issue but we came to the consensus that slow docs were better than no docs. Even with JavaScript disabled this page is heavy on my machine. Should we consider a text only render method for doc pages to help with cases like this?

@jba
Copy link
Contributor

@jba jba commented Mar 15, 2022

Is there a way to disable the layout engine until the page fully loads?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
NeedsInvestigation pkgsite UX
Projects
None yet
Development

No branches or pull requests

4 participants