Render only first 50 mention items per group. Show all button is displayed at the bottom of the list to load all items.
Loading first 50 items applies to all "mention" sections: reference papers, mentions, output and impact because this component is shared.
All items are (still) loaded server side. I did not move api request to the frontend because when Javascript is disabled the mentions will not be loaded at all.
The Javascript support message is moved below other header elements (search & nav). The notification message was not properly shown on the smaller screens (tablet & smartphone).
How to test:
make start to build an create test data. This example is better tested without many data, so remove test data docker compose down --volumes & docker compose up
wait for scrapers to scrape reference papers, it should scrape 2575 references
visit software page and confirm mentions are loaded,
visit software overview page and confirm improved load time. On my machine the performance is improved from ~3.75sec. to ~1.2sec. on my machine. See images
Performance measured on PC AMD Ryzen 9 3900X
Old approach (~ 3.75 sec)
Improved approach (~1.2sec)
PR Checklist:
[ ] Increase version numbers in docker-compose.yml
Improve mentions performance
Closes #1107
Changes proposed in this pull request:
How to test:
make start
to build an create test data. This example is better tested without many data, so remove test datadocker compose down --volumes & docker compose up
Performance measured on PC AMD Ryzen 9 3900X
Old approach (~ 3.75 sec)![Main-Mentions-2024-02-05 20-32-37](https://github.com/research-software-directory/RSD-as-a-service/assets/9204081/df8c8d17-1657-45e2-9442-5477c7ba50ad)
Improved approach (~1.2sec)![Mentions-2024-02-05 20-27-35](https://github.com/research-software-directory/RSD-as-a-service/assets/9204081/f0c69656-e0c0-43b7-a994-541e59a99759)
PR Checklist:
docker-compose.yml