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

Slowness loading pages with new esbuild #6821

Closed
1 task done
paolodamico opened this issue Nov 3, 2021 · 2 comments · Fixed by #6942
Closed
1 task done

Slowness loading pages with new esbuild #6821

paolodamico opened this issue Nov 3, 2021 · 2 comments · Fixed by #6942
Labels
performance Has to do with performance. For PRs, runs the clickhouse query performance suite

Comments

@paolodamico
Copy link
Contributor

In what situation are you experiencing subpar performance?

App navigation now feels noticeably slower when loading new pages for the first time. One time it even took more than 6s, and because there's no loader, it feels like something is broken. A recording that doesn't look too drastic:

image

How to reproduce

See recording above.

Environment

  • PostHog Cloud

Additional context

Originally posted on https://github.com/PostHog/product-internal/issues/220. Moving here.

Thank you for your performance issue report – we want PostHog to go supersonic!

@paolodamico paolodamico added performance Has to do with performance. For PRs, runs the clickhouse query performance suite team-core-experience labels Nov 3, 2021
@paolodamico
Copy link
Contributor Author

Context from @Twixes:

Regarding the slowness, that doesn't seem related to the new UI. Maybe it's esbuild chunking? Looks like esbuild first downloads the initial page chunk, and only then determines what others chunks to load, leading to a staggered load (totaling ~1 second of wait time on first scene load).

image

@paolodamico
Copy link
Contributor Author

From @mariusandra:

Hmm, this behaviour is not optimal. It can be solved though.
We can use esbuild's build metadata to determine which urls need which chunks, and then have index.html load all of them directly. Just more work to do, but doable.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
performance Has to do with performance. For PRs, runs the clickhouse query performance suite
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant