Skip to content

Make sure we ask for UV asap for faster image display#699

Draft
maxkadel wants to merge 3 commits into
mainfrom
defer_javascript_so_uv_loaded_sooner
Draft

Make sure we ask for UV asap for faster image display#699
maxkadel wants to merge 3 commits into
mainfrom
defer_javascript_so_uv_loaded_sooner

Conversation

@maxkadel

@maxkadel maxkadel commented Jul 13, 2026

Copy link
Copy Markdown
Member

Story

Refs https://github.com/notch8/dev-ops/issues/1393

IIIF viewer javascript is pre-loaded on work show pages, and no longer waits to start fetching it until after the javascript is fully executed

Fixes

There is a general perception that Hyrax and Hyku are slow, and some of this comes from IIIF viewers taking awhile to show images. By default, the viewers are "above the fold" on work pages, so if they take a long time to render an image, the impression it gives is that the overall application is slow, not just that the viewer is slow.

This frontloads getting the iiif viewer javascript, and not waiting for the whole application javascript to execute prior to trying to fetch the viewer javascript.

Tested on a staging environment for a Hyku knapsack and shaved 3 seconds off of loading time.

Summary

Present tense short summary (50 characters or less)

Guidance for testing, such as acceptance criteria or new user interface behaviors:

  • For a deployment using Universal Viewer, the uv.html will start loading before the application javascript has finished executing.

Type of change (for release notes)

Choose from:

  • notes-bugfix Bug Fixes

Changes proposed in this pull request:

  • Pre-load iiif viewer on work show pages when available
  • The browser does not have to load and evaluate the scripts before continuing to parse

@github-actions

github-actions Bot commented Jul 13, 2026

Copy link
Copy Markdown

Test Results

     4 files  ±0       4 suites  ±0   6s ⏱️ -1s
52 850 tests ±0  52 850 ✅ ±0  0 💤 ±0  0 ❌ ±0 
   121 runs  ±0     121 ✅ ±0  0 💤 ±0  0 ❌ ±0 

Results for commit 2f09370. ± Comparison against base commit cfd424c.

♻️ This comment has been updated with latest results.

@maxkadel
maxkadel marked this pull request as ready for review July 14, 2026 13:26
@maxkadel

maxkadel commented Jul 14, 2026

Copy link
Copy Markdown
Member Author

I tried adding this to Hyrax, but it interferes with the Batch Update javascript. I don't think Hyku uses batch update - see samvera/hyrax#7538

@maxkadel
maxkadel marked this pull request as draft July 14, 2026 16:11
@maxkadel

Copy link
Copy Markdown
Member Author

Converting to draft until we confirm whether Batch Upload may be impacted

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.

2 participants