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

[Form/Profiler] Massively reducing memory footprint of form profiling pages...#27923

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:3.4fromcleverage:form_profiling_optim
Jul 12, 2018

Conversation

VincentChalnot
Copy link

… by removing redundant 'form' variable from view variables.

QA
Branch?3.4
Bug fix?yes
New feature?no
BC breaks?no
Deprecations?no
Tests pass?yes
Fixed tickets
LicenseMIT
Doc PR

Problem

When trying to profile large forms in web profiler, the page can get so big that the memory footprint of the web browser excedes 1Gb making everything unusable and sometimes crashing the browser.

This is especially true for "deep" forms as every node of the form also contains its children in the debugging infos.

Solution

When removing the "form" view variable that actually contains duplicated contents of everything already displayed in the page, the memory footprint massively decrease making the page usable again even form very complex and deep forms.

By using CutStub, we keep a necessary level of information by providing the information that the variable is indeed here but not directly accessible in the dump.

t-n-y and vudaltsov reacted with thumbs up emojiyceruto, ryuran, ro0NL, jvasseur, apfelbox, ostrolucky, javiereguiluz, roincent, hason, vudaltsov, and 2 more reacted with hooray emoji
… pages by removing redundant 'form' variable from view variables.
Copy link
Member

@ycerutoyceruto left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others.Learn more.

Tested in my project where I couldn't access the form profile due to the memory limit reached, thank you@VincentChalnot!

@xabbuh
Copy link
Member

For 2.8?

@VincentChalnot
Copy link
Author

@xabbuh I never had this problem in Symfony 2.8 so I created this PR on the 3.4 branch but I can rebase on the 2.8 version if it can be backported to 3.4 after that.
I don't have any project in 4+ to test it.

@ogizanagi
Copy link
Contributor

Great first contribution!
I think this cannot go as is in 2.8 anyway, as we don't use the VarDumper component in profiler yet (only since 3.x). So this PR targeting 3.4 is fine.

@xabbuhxabbuh added this to the3.4 milestoneJul 11, 2018
Copy link
Member

@fabpotfabpot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others.Learn more.

What a great first contribution!

@fabpot
Copy link
Member

Thank you@VincentChalnot.

@fabpotfabpot merged commit5f5077f intosymfony:3.4Jul 12, 2018
fabpot added a commit that referenced this pull requestJul 12, 2018
…m profiling pages... (VincentChalnot)This PR was merged into the 3.4 branch.Discussion----------[Form/Profiler] Massively reducing memory footprint of form profiling pages...… by removing redundant 'form' variable from view variables.| Q             | A| ------------- | ---| Branch?       | 3.4| Bug fix?      | yes| New feature?  | no| BC breaks?    | no| Deprecations? | no| Tests pass?   | yes| Fixed tickets || License       | MIT| Doc PR        |## ProblemWhen trying to profile large forms in web profiler, the page can get so big that the memory footprint of the web browser excedes 1Gb making everything unusable and sometimes crashing the browser.This is especially true for "deep" forms as every node of the form also contains its children in the debugging infos.## SolutionWhen removing the "form" view variable that actually contains duplicated contents of everything already displayed in the page, the memory footprint massively decrease making the page usable again even form very complex and deep forms.By using CutStub, we keep a necessary level of information by providing the information that the variable is indeed here but not directly accessible in the dump.Commits-------5f5077f [Form/Profiler] Massively reducing memory footprint of form profiling pages by removing redundant 'form' variable from view variables.
@VincentChalnotVincentChalnot deleted the form_profiling_optim branchJuly 12, 2018 08:03
@VincentChalnot
Copy link
Author

@yceruto,@ogizanagi,@fabpot thank you for your kind words.

ogizanagi, yceruto, lyrixx, rvanlaak, and MisatoTremor reacted with heart emoji

@nicolas-grekas
Copy link
Member

nicolas-grekas commentedJul 23, 2018
edited
Loading

Oups, there is an issue here: this turnsVarDumper into a mandatory dependency. I'm having a look right now.

@VincentChalnot
Copy link
Author

I assumed it was already a mandatory dependency but I see that there is a hack in the FormDataCollector class to handle whether the VarDumper component exists or not... Do you need me to fix my PR?

@nicolas-grekas
Copy link
Member

@yceruto@VincentChalnot can you please confirm#28037 also fixes the issue?

nicolas-grekas added a commit that referenced this pull requestJul 23, 2018
…las-grekas)This PR was merged into the 3.4 branch.Discussion----------[Form] fix truncating form views in data collector| Q             | A| ------------- | ---| Branch?       | 3.4| Bug fix?      | no (fixing a non released patch)| New feature?  | no| BC breaks?    | no| Deprecations? | no| Tests pass?   | yes| Fixed tickets | -| License       | MIT| Doc PR        | -Fixes#27923.Commits-------5fa1f12 [Form] fix truncating form views in data collector
This was referencedJul 23, 2018
VincentChalnot pushed a commit to VincentChalnot/SidusBaseBundle that referenced this pull requestNov 28, 2018
Improved Form event bubblingsymfony/symfony#8834 (comment)Removing custom code fixed bysymfony/symfony#27923
Sign up for freeto join this conversation on GitHub. Already have an account?Sign in to comment
Reviewers

@fabpotfabpotfabpot approved these changes

@xabbuhxabbuhxabbuh approved these changes

@ycerutoycerutoyceruto approved these changes

@ogizanagiogizanagiogizanagi approved these changes

Assignees
No one assigned
Projects
None yet
Milestone
3.4
Development

Successfully merging this pull request may close these issues.

7 participants
@VincentChalnot@xabbuh@ogizanagi@fabpot@nicolas-grekas@yceruto@carsonbot

[8]ページ先頭

©2009-2025 Movatter.jp