internetarchive / openlibrary

One webpage for every book ever published!
https://openlibrary.org
GNU Affero General Public License v3.0
5.23k stars 1.38k forks source link

Add lazy loading for covers in works merge tool #9201

Open RayBB opened 6 months ago

RayBB commented 6 months ago

Right now we load all covers on the merge page even if they're not visible. If we add lazy loading to them it will massively cut down on requests. Should be a pretty good first issue.

Describe the problem that you'd like solved

image

Proposal & Constraints

https://openlibrary.org/works/merge?records=OL21868175W,OL41495W

Additional context

Stakeholders

@cdrini

Realmbird commented 6 months ago

@RayBB can I work on this

RayBB commented 6 months ago

@Realmbird you are assigned now.

Realmbird commented 6 months ago

@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