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

Reordering Contexts in larger installations slow and results to thousands of unnecessary queries #10577

Open
ajnyga opened this issue Nov 1, 2024 · 0 comments
Labels
Try Me This issue might be good for a new contributor. Can you help us?

Comments

@ajnyga
Copy link
Collaborator

ajnyga commented Nov 1, 2024

Describe the bug
When an installation has a large number of contexts, reordering the list of contexts becomes slow. This is because saving the new order will result to resaving all context settings table data, not only the new order. The reordering therefore triggers thousands of queries leading to slow performance. With 150 journals it can take up to 60 seconds for the new order to be stored.

We should just update the new sequence and not touch the settings data.

To Reproduce
Steps to reproduce the behavior:

  1. Start query logging
  2. Go to Administration > Hosted journals
  3. Click on 'Order'
  4. Reorder contexts
  5. Hit Done, see results in query log

What application are you using?
OJS, OMP and OPS all versions 3.0+

Additional information
Related code
https://github.com/pkp/pkp-lib/blob/main/controllers/grid/admin/context/ContextGridHandler.php#L155-L163

@asmecher asmecher added the Try Me This issue might be good for a new contributor. Can you help us? label Nov 1, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Try Me This issue might be good for a new contributor. Can you help us?
Projects
None yet
Development

No branches or pull requests

2 participants