openlibhums / openlibhums/janeway

Slow load times on Issue manager

Open
#2,121 2 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

bug enhancement Size S
Dominant language
Python
Stars
239
Forks
97
Avg merge
9d 1h
Merged PRs (30d)
8

Description

Describe the bug
On larger journals, the issue manager page for a given issue can take a long time to load and, in the worst case, timeout, blocking editors from reordering issues or editing their details.

Janeway version
v1.3.9

Expected behavior
Pagination cannot solve this one, since issue reordering requires displaying all elements on the screen at one time. Instead we should first look into:

  • Selective querying: This page does not require loading the entire model instance for each model. We could get away with selective querying such as ID/DOI, title, and maybe joined author names.
  • Optimise joins: I believe the way in which we are querying is leading to a full scan on the larger table (articles). Look into flipping the query around to improve performance
  • Join ahead of time. Use select_related and prefetch_related to JOIN tables like identifiers and authors ahead of time.
  • For larger issues/sections, consider dynamically loading children (articles) as needed

Ultimately, we are talking issues with a cardinality of hundreds of items, we can definately improve this experience
Additional context
Reported by Iowa State University Digital Press

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

The issue names no file or test; start by locating the Issue manager view and its query path, then profile it with a journal containing hundreds of items. Compare the listed query and loading approaches, and consider the work done when the page no longer times out while reordering and editing still work.

Written by the indexing model from the issue text.

Assessment

Tech stack
python
Domain
backend, performance
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.