-
Notifications
You must be signed in to change notification settings - Fork 125
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
ENH: Add performance fixes on saving editable columns #341
ENH: Add performance fixes on saving editable columns #341
Conversation
33b16f1
to
8b2a541
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If we change the protected method to private then there's no API change so we can do a patch release meaning we release it much faster.
Please rebase/retarget to the 3.4
branch
Also prefix your commit message and the title of the PR with ENH
as this is an enhancement
8b2a541
to
3334a66
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Have tested locally - I noticed a syntax error - I fixed on my local and this seemed to work correctly.
Happy to merge after this is fixed
src/GridFieldEditableColumns.php
Outdated
|
||
if (!$item || !$item->canEdit()) { | ||
// Skip not found item, or don't have any changed fields, or current user can't edit | ||
if (!$item || !$this->isChanged($item, $fields) || !$item-canEdit()) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
if (!$item || !$this->isChanged($item, $fields) || !$item-canEdit()) { | |
if (!$item || !$this->isChanged($item, $fields) || !$item->canEdit()) { |
- Use one query to fetch all items needed to be saved. - Only save items that are changed.
3334a66
to
547ec8a
Compare
I've released 3.4.1 for you |
The changes in the PR to address the issue described in silverstripe/silverstripe-userforms#773
This might not eliminate the issue completely, but it is an improvement to the current code.
Changes include,