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

Add lazy loading for covers in works merge tool #9201

Closed
Tracked by #9121
RayBB opened this issue Apr 30, 2024 · 7 comments · Fixed by #10109
Closed
Tracked by #9121

Add lazy loading for covers in works merge tool #9201

RayBB opened this issue Apr 30, 2024 · 7 comments · Fixed by #10109
Assignees
Labels
Good First Issue Easy issue. Good for newcomers. [managed] Lead: @RayBB Issues overseen by Ray (Onboarding & Documentation Lead) [manages] Priority: 3 Issues that we can consider at our leisure. [managed] Type: Feature Request Issue describes a feature or enhancement we'd like to implement. [managed]

Comments

@RayBB
Copy link
Collaborator

RayBB commented Apr 30, 2024

The works merge page currently loads all book cover images upfront, even those that are not immediately visible in the viewport. This causes unnecessary network requests and slower page load times.

Describe the problem that you'd like solved

We need to implement lazy loading for book cover images on the works merge page to:

  • Only load images when they come into the viewport
  • Reduce initial page load time
  • Decrease unnecessary network requests
  • Improve overall performance
Screenshot showing multiple image requests on page load

image

Proposal & Constraints

There was a previous PR here that started this but wasn't finished.
If you'd like to work on this please review that PR and all the comments on it and incorporate the feedback.

To be assigned to his issue comment saying that you have read this PR and will incorporate that feedback into your own PR.

To test locally you'll need to add data by running something like
docker compose exec -e PYTHONPATH=. web bash -c "./scripts/copydocs.py /works/OL21868175W /works/OL41495W"

Additional context

Example merge page showing the issue:
https://openlibrary.org/works/merge?records=OL21868175W,OL41495W

Stakeholders

@cdrini

@RayBB RayBB added Type: Feature Request Issue describes a feature or enhancement we'd like to implement. [managed] Needs: Triage This issue needs triage. The team needs to decide who should own it, what to do, by when. [managed] Needs: Lead labels Apr 30, 2024
@mekarpeles mekarpeles added Lead: @RayBB Issues overseen by Ray (Onboarding & Documentation Lead) [manages] Priority: 3 Issues that we can consider at our leisure. [managed] and removed Needs: Lead Needs: Triage This issue needs triage. The team needs to decide who should own it, what to do, by when. [managed] labels May 6, 2024
@Realmbird

This comment was marked as outdated.

@github-actions github-actions bot added the Needs: Response Issues which require feedback from lead label May 7, 2024
@RayBB

This comment was marked as outdated.

@mekarpeles mekarpeles removed the Needs: Response Issues which require feedback from lead label May 20, 2024
@Realmbird
Copy link
Contributor

@RayBB recreated problem docker compose exec -e PYTHONPATH=. web bash -c "./scripts/copydocs.py /works/OL21868175W /works/OL41495W"
Screenshot from 2024-05-21 12-33-11

@github-actions github-actions bot added the Needs: Response Issues which require feedback from lead label May 22, 2024
@RayBB RayBB added Needs: Staff / Internal Reviewed a PR but don't have merge powers? Use this. and removed Needs: Response Issues which require feedback from lead labels May 22, 2024
@RayBB RayBB added Good First Issue Easy issue. Good for newcomers. [managed] and removed Needs: Staff / Internal Reviewed a PR but don't have merge powers? Use this. labels Nov 26, 2024
@zafazmii
Copy link
Contributor

Hi @RayBB, can I take on this issue?

@RayBB
Copy link
Collaborator Author

RayBB commented Nov 27, 2024

@chongthepro please read the full issue and follow the instructions in it to be assigned.

@zafazmii
Copy link
Contributor

Hi @RayBB, I have read the feedback in the previous PR and will incorporate it into mine.

@RayBB
Copy link
Collaborator Author

RayBB commented Nov 27, 2024

@chongthepro thanks! You're assigned. Good luck!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Good First Issue Easy issue. Good for newcomers. [managed] Lead: @RayBB Issues overseen by Ray (Onboarding & Documentation Lead) [manages] Priority: 3 Issues that we can consider at our leisure. [managed] Type: Feature Request Issue describes a feature or enhancement we'd like to implement. [managed]
Projects
None yet
4 participants