Skip to content

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

Open

Description

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Assignees

No one assigned

    Labels

    Try MeThis issue might be good for a new contributor. Can you help us?

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions