Skip to content

(Update) Improve footer performance #4198

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

Merged
merged 1 commit into from
Oct 2, 2024

Conversation

Roardom
Copy link
Collaborator

@Roardom Roardom commented Oct 2, 2024

This function was ran in every view. The problem is for every partial, it was ran again. On pages like /mediahub/persons/x, this function was called 4000+ times because of all the partials, causing redis cache hits to use up more than 75% of the processing time to return the response. Fix by only calling it in the footer explicitly.

This function was ran in every view. The problem is for every partial, it was ran again. On pages like /mediahub/persons/x, this function was called 4000+ times because of all the partials, causing redis cache hits to use up more than 75% of the processing time to return the response. Fix by only calling it in the footer explicitly.
@HDVinnie HDVinnie merged commit ad6d542 into HDInnovations:8.x.x Oct 2, 2024
5 checks passed
@HDVinnie HDVinnie deleted the improve-footer-performance branch October 2, 2024 20:03
Roardom added a commit to Roardom/UNIT3D that referenced this pull request Feb 20, 2025
Keeps code more organized by not having database queries inside the view. Just learned that these were a thing, and realized in the process why there was the issue with HDInnovations#4198 - it was because it was matching on `*`, i.e. all views, so it would render once for every single view, including each include.
Roardom added a commit to Roardom/UNIT3D that referenced this pull request Feb 20, 2025
Keeps code more organized by not having database queries inside the view. Just learned that these were a thing, and realized in the process why there was the issue with HDInnovations#4198 - it was because it was matching on `*`, i.e. all views, so it would render once for every single view, including each include.
Roardom added a commit to Roardom/UNIT3D that referenced this pull request Feb 20, 2025
Keeps code more organized by not having database queries inside the view. Just learned that these were a thing, and realized in the process why there was the issue with HDInnovations#4198 - it was because it was matching on `*`, i.e. all views, so it would render once for every single view, including each include.
Roardom added a commit to Roardom/UNIT3D that referenced this pull request Feb 20, 2025
Keeps code more organized by not having database queries inside the view. Just learned that these were a thing, and realized in the process why there was the issue with HDInnovations#4198 - it was because it was matching on `*`, i.e. all views, so it would render once for every single view, including each include.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants