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

fix(blacklist): request data only when modal is shown, remove useless ratelimit and lazy load blacklist #1084

Merged
merged 4 commits into from
Nov 12, 2024

Conversation

gauthier-th
Copy link
Collaborator

Description

For admin users, the button to blacklist a media (used on every media card) was displaying a Modal, that was requesting data BEFORE the modal was displayed. This resulted in dozens of additional requests everytime media cards were displayed.

A useless ratelimit has also been removed on the blacklist endpoint.

Joins between the Media table and the Blacklist table will be lazy loaded instead of being eager loaded.

Screenshot (if UI-related)

To-Dos

  • Successful build pnpm build
  • Translation keys pnpm i18n:extract
  • Database migration (if required)

Try to resolve some performance issues by removing the eager loading of Blacklist items from the
Media entity
For admin users, the button to blacklist a media (used on every media card) was displaying a Modal,
that was requesting data BEFORE the modal was displayed. This resulted in dozens of additional
requests everytime media cards were displayed.
@fallenbagel
Copy link
Owner

Finally. Two weeks of agony ended

@fallenbagel fallenbagel changed the title perf(blacklist): request data only when modal is shown, remove useless ratelimit and lazy load blacklist fix(blacklist): request data only when modal is shown, remove useless ratelimit and lazy load blacklist Nov 12, 2024
Copy link
Owner

@fallenbagel fallenbagel left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@fallenbagel fallenbagel merged commit 694913c into develop Nov 12, 2024
7 checks passed
@fallenbagel fallenbagel deleted the fix-blacklist-perfs branch November 12, 2024 19:01
@fallenbagel
Copy link
Owner

🎉 This PR is included in version 2.1.0 🎉

The release is available on:

Your semantic-release bot 📦🚀

thibodelanghe pushed a commit to thibodelanghe/jellyseerr that referenced this pull request Dec 18, 2024
… ratelimit and lazy load blacklist (fallenbagel#1084)

* perf: remove eager load of Blacklist entity from Media entity

Try to resolve some performance issues by removing the eager loading of Blacklist items from the
Media entity

* fix: fix ManageSlideOver for blacklist

* perf(blacklist): request data only when modal is shown

For admin users, the button to blacklist a media (used on every media card) was displaying a Modal,
that was requesting data BEFORE the modal was displayed. This resulted in dozens of additional
requests everytime media cards were displayed.

* perf(blacklist): remove useless ratelimit
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants