-
Notifications
You must be signed in to change notification settings - Fork 278
Open
Labels
Description
Describe the feature
Currently, the get_all_images endpoint fetches all images at once. This can lead to performance issues and high memory usage for users with large image collections. Implementing pagination would make the app more efficient and scalable.
Proposed Solution
- Backend:
- Update
backend/app/routes/images.pyto acceptlimitandoffsetquery parameters. - Modify the database query in
backend/app/database/images.pyto support pagination.
- Update
- Frontend:
- Update the API function in
frontend/src/api/api-functions.tsto include pagination parameters. - Modify
frontend/src/pages/Home/Home.tsxto load images in chunks or via infinite scroll.
- Update the API function in
Benefits
- Faster page loads.
- Reduced bandwidth and memory usage.
- Better scalability for large datasets.
- Improved user experience with smoother loading.
Relevant Files
backend/app/routes/images.pybackend/app/database/images.pyfrontend/src/api/api-functions.tsfrontend/src/pages/Home/Home.tsx
Add ScreenShots
Not applicable - this is a performance enhancement and not a UI bug.
Record
- I agree to follow this project's Code of Conduct
- I want to work on this issue
Checklist before Submitting.
- Have you updated docs for it?.
- Have you added unit tests?.
- Have you made sure unit tests pass?
- Have you made sure code formatting is correct?
- Does it contain any style related issues?