Skip to content
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

Only request the needed schema in table view #2568

Merged
merged 1 commit into from
May 31, 2016

Conversation

nitriques
Copy link
Member

This changes uses the array returned by $section->fetchVisibleColumns() in order to create the element names array to pass to the entry manager. This yields a nice performance update when a section contains many (hundreds) of fields but only a few of them are needed for the publish table view.

I do not see how this can't be backward compatible, but I created a PR just to document the change and ask for testers! :)

Thanks!

This changes uses the array returned by $section->fetchVisibleColumns() in order to create the element names array to pass to the entry manager. This yeilds a nice performance update when a section contains many (hundreads) of fields but only a few of them are needed for the publish table view.
@michael-e
Copy link
Member

Honestly, I don't see any performance difference. Should I increase the number of entries per page, maybe?

@nitriques
Copy link
Member Author

Should I increase the number of entries per page, maybe?

Yes. But you get a real gain when you have a field with hundreds of fields (which, I agree, can be a pain to create).

But most importantly: there's no bug?

@michael-e
Copy link
Member

No, it didn't break, which is good. :-)

hundreds of fields

My test section has 75 fields — no visible difference, even with 100 entries per page. Maybe my server is too fast. :-))

@nitriques
Copy link
Member Author

Maybe my server is too fast. :-))

Well, maybe :P The problem was not the webserver tho, it was the DB... I saved 500ms of a request that was taking 2500ms (which is 20% decrease)

@nitriques
Copy link
Member Author

After testing by myself and @michael-e it's safe to merge in.

@nitriques nitriques merged commit 92f762b into symphonycms:2.7.x May 31, 2016
@nitriques nitriques deleted the optimize-publish-table branch May 31, 2016 17:51
@michael-e michael-e mentioned this pull request Jul 19, 2016
jensscherbl pushed a commit that referenced this pull request May 28, 2017
This changes uses the array returned by $section->fetchVisibleColumns() in order to create the element names array to pass to the entry manager. This yeilds a nice performance update when a section contains many (hundreads) of fields but only a few of them are needed for the publish table view.

Rebase of 34bd49f
nitriques added a commit that referenced this pull request Jun 16, 2017
This changes uses the array returned by $section->fetchVisibleColumns() in order to create the element names array to pass to the entry manager. This yeilds a nice performance update when a section contains many (hundreads) of fields but only a few of them are needed for the publish table view.

Rebase of 34bd49f

Picked from 92f762b
nitriques added a commit that referenced this pull request Jun 16, 2017
This changes uses the array returned by $section->fetchVisibleColumns() in order to create the element names array to pass to the entry manager. This yeilds a nice performance update when a section contains many (hundreads) of fields but only a few of them are needed for the publish table view.

Rebase of 34bd49f

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

Successfully merging this pull request may close these issues.

None yet

2 participants