Uh oh!
There was an error while loading.Please reload this page.
- Notifications
You must be signed in to change notification settings - Fork9.7k
[WebProfilerBundle] Improve performance#54421
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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.
Already on GitHub?Sign in to your account
Uh oh!
There was an error while loading.Please reload this page.
Conversation
…filer layout (javiereguiluz)This PR was squashed before being merged into the 7.1 branch.Discussion----------[WebProfilerBundle] Update the search links in the profiler layout| Q | A| ------------- | ---| Branch? | 7.1| Bug fix? | no| New feature? | yes| Deprecations? | no| Issues | -| License | MITWhile working on#54421, I noticed that the page jump is mostly caused by the "profile search form" that we embed in the page via Ajax. This is how it looks expanded:However, thew workflow is as follows:1. Click on `Search` link2. The embedded search form expands3. Input the search criteria4. Click on `Search` button5. You are redirected to the Search page to see the results-----In this PR, I propose to NOT embed the search form in any pages and change the workflow as follows:1. Click on `Search` link2. You are redirected to the Search page to see the results3. Input the search criteria (in the already expanded search form)4. Click on `Search` button to see the resultsThis fixes some of the perceived performance slowdown and looks like a better workflow to me.-----Also, the current sidebar shows these shortcut links:* "Last 10" shows the 10 most recent profiles* "Latest" shows the most recent profile available* "Search" expands the search formThis PR changes it to only show 2 shortcuts:* "Search profiles" shows the last 10 profiles and also the search form expanded* "Latest" shows the most recent profile aaailableIt looks like this:Commits-------7baa29e [WebProfilerBundle] Update the search links in the profiler layout
smnandre commentedApr 10, 2024
To avoid any redraw and ensure maximum performances, we should implement the reordering directly in CSS #menu-profiler {/** ... existing rules */display: flex;flex-direction: column;}#menu-profilerli:has(span.disabled) {order:1;} ( |
cae2cb9 to03fc648Comparejaviereguiluz commentedApr 12, 2024
Simon, you are a genius 🙇 🙇 I did what you suggested: it works perfectly and it solves the remaining performance issues. The profiler pages now feel very snappy. Thanks! This is now ready for a final review. |
smnandre commentedApr 12, 2024
❤️ Thankyou for tackling those issues :) |
fabpot commentedApr 13, 2024
Thank you@javiereguiluz. |
This PR tries to solve the following problem:
When clicking on panels like
LogsorDoctrine, the page contents take some time to be ready ... and the JavaScript code that runs to change/Add things to UI, produces visible jumps:profiler-panel-jump.mp4
I debugged this behavior and the browser shows a "Long Task" warning message but not many other details:
I followed Google's recommendations:https://web.dev/articles/optimize-long-tasks and split the
SymfonyProfilertasks in two group: critical (menu and tabs) and normal (the rest of features).That change in addition to
<meta name="view-transition" content="same-origin">improves the situation, but it's still not perfect.So, this PR is mostlya call for help to JavaScript experts. Please help us make the UI as fast as possible. Thanks!