-
-
Notifications
You must be signed in to change notification settings - Fork 9.6k
[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 our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
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 | MIT While 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` link 2. The embedded search form expands 3. Input the search criteria 4. Click on `Search` button 5. 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` link 2. You are redirected to the Search page to see the results 3. Input the search criteria (in the already expanded search form) 4. Click on `Search` button to see the results This 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 form This 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 aaailable It looks like this:  Commits ------- 7baa29e [WebProfilerBundle] Update the search links in the profiler layout
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-profiler li:has(span.disabled) {
order: 1;
} ( |
cae2cb9
to
03fc648
Compare
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. |
❤️ Thank you for tackling those issues :) |
493b2f9
to
29a271b
Compare
Thank you @javiereguiluz. |
This PR tries to solve the following problem:
When clicking on panels like
Logs
orDoctrine
, 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
SymfonyProfiler
tasks 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 mostly a call for help to JavaScript experts. Please help us make the UI as fast as possible. Thanks!