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

Speed up page reordering #2747

Merged
merged 1 commit into from
Nov 8, 2014
Merged

Speed up page reordering #2747

merged 1 commit into from
Nov 8, 2014

Conversation

vladimir-tikhonov
Copy link
Contributor

Updated version of #2746, fixed issue with AR cache.

update_positions and update_child_positions methods perform a lot of useless UPDATE queries. Pull request adds few checks to prevent this. Fixes #2702 and #2631

Some benchmarking (315 pages, https://gist.github.com/vladimir-tikhonov/7aea6077be29c38ab6f7):
Before:

Click 'Reorder Pages' and then immediately 'Done Reordering Pages': 21981.7ms
Click 'Reorder Pages', mix pages for 5 seconds and 'Done Reordering Pages': 21779.1ms

After:

Click 'Reorder Pages' and then immediately 'Done Reordering Pages': 644.8ms
Click 'Reorder Pages', mix pages for 5 seconds and 'Done Reordering Pages': 2878.9ms

@gogogarrett
Copy link
Contributor

Looks to be a big win

parndt added a commit that referenced this pull request Nov 8, 2014
@parndt parndt merged commit c086f4f into refinery:master Nov 8, 2014
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.

Insane number of queries during reordering.
3 participants