Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

[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

Merged
fabpot merged 1 commit intosymfony:7.1fromjaviereguiluz:profiler_performance
Apr 13, 2024

Conversation

@javiereguiluz
Copy link
Member

QA
Branch?7.1
Bug fix?yes
New feature?no
Deprecations?no
Issues-
LicenseMIT

This PR tries to solve the following problem:

When clicking on panels likeLogs 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:

image

I followed Google's recommendations:https://web.dev/articles/optimize-long-tasks and split theSymfonyProfiler 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 mostlya call for help to JavaScript experts. Please help us make the UI as fast as possible. Thanks!

kaznovac reacted with rocket emoji
@javiereguiluzjaviereguiluz added WebProfilerBundle Help wantedIssues and PRs which are looking for volunteers to complete them. labelsMar 27, 2024
@javiereguiluzjaviereguiluz added this to the7.1 milestoneMar 27, 2024
@carsonbotcarsonbot changed the title(WIP) [WebProfilerBundle] Improve performance[WebProfilerBundle] (WIP) Improve performanceMar 27, 2024
fabpot added a commit that referenced this pull requestApr 5, 2024
…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:![image](https://github.com/symfony/symfony/assets/73419/090febc8-65e6-4ede-8c21-8b3fb0d738d2)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:![image](https://github.com/symfony/symfony/assets/73419/1ef165fe-1ac1-42ff-8d01-1514c2b2320f)* "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:![search-links](https://github.com/symfony/symfony/assets/73419/8f2ba944-c9a3-4f56-9a12-4818c79bfdcb)Commits-------7baa29e [WebProfilerBundle] Update the search links in the profiler layout
@smnandre
Copy link
Member

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;}

(:has isbaseline in 2023 so this work for more than 95% of users, and the few ones with browsers not implementing:has will just see the list as before)

kaznovac, javiereguiluz, and chalasr reacted with thumbs up emoji

@javiereguiluzjaviereguiluz changed the title[WebProfilerBundle] (WIP) Improve performance[WebProfilerBundle] Improve performanceApr 12, 2024
@javiereguiluz
Copy link
MemberAuthor

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.

chalasr and smnandre reacted with rocket emoji

@javiereguiluzjaviereguiluz added ❄️ Feature FreezeImportant Pull Requests to finish before the next Symfony "feature freeze" and removed Status: Needs Work Help wantedIssues and PRs which are looking for volunteers to complete them. labelsApr 12, 2024
@smnandre
Copy link
Member

The profiler pages now feel very snappy.

❤️ Thankyou for tackling those issues :)

javiereguiluz reacted with heart emoji

@fabpot
Copy link
Member

Thank you@javiereguiluz.

@fabpotfabpot merged commitc29b7a9 intosymfony:7.1Apr 13, 2024
@javiereguiluzjaviereguiluz deleted the profiler_performance branchApril 13, 2024 07:28
Sign up for freeto join this conversation on GitHub. Already have an account?Sign in to comment

Reviewers

@fabpotfabpotfabpot approved these changes

+1 more reviewer

@smnandresmnandresmnandre approved these changes

Reviewers whose approvals may not affect merge requirements

Assignees

No one assigned

Labels

Bug❄️ Feature FreezeImportant Pull Requests to finish before the next Symfony "feature freeze"Status: ReviewedWebProfilerBundle

Projects

None yet

Milestone

7.1

Development

Successfully merging this pull request may close these issues.

4 participants

@javiereguiluz@smnandre@fabpot@carsonbot

[8]ページ先頭

©2009-2025 Movatter.jp