Skip to content

[Form] Improved performance of ChoiceType and EntityType #4881

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

Merged
merged 3 commits into from
Jul 12, 2012

Conversation

webmozart
Copy link
Contributor

Bug fix: no
Feature addition: no
Backwards compatibility break: no
Symfony2 tests pass: yes
Fixes the following tickets: -
Todo: -

fabpot added a commit that referenced this pull request Jul 12, 2012
Commits
-------

a924dab [OptionsResolver] Made the OptionsResolver clonable
70307e5 [Form] Improved EntityType performance by caching the EntityChoiceList
8298d8c [Form] Improved ChoiceType performance by caching ChoiceList objects

Discussion
----------

[Form] Improved performance of ChoiceType and EntityType

Bug fix: no
Feature addition: no
Backwards compatibility break: no
Symfony2 tests pass: yes
Fixes the following tickets: -
Todo: -
@fabpot fabpot merged commit a924dab into symfony:master Jul 12, 2012
@@ -59,17 +65,34 @@ public function setDefaultOptions(OptionsResolverInterface $resolver)
return null;
};

$choiceList = function (Options $options) use ($registry) {
$choiceList = function (Options $options) use ($registry, &$choiceListCache, &$time) {
Copy link
Member

Choose a reason for hiding this comment

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

what is $time here ? it seems undefined and unused

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Fixed already. I was faster than you hehehe ;)

Copy link
Member

Choose a reason for hiding this comment

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

Copy link
Contributor Author

Choose a reason for hiding this comment

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

It's in the next PR.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants