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

Prerender static routes in Nuxt #5195

Open
obulat opened this issue Nov 28, 2024 · 0 comments
Open

Prerender static routes in Nuxt #5195

obulat opened this issue Nov 28, 2024 · 0 comments
Labels
💻 aspect: code Concerns the software code in the repository ✨ goal: improvement Improvement to an existing user-facing feature 🟨 priority: medium Not blocking but should be addressed soon 🧱 stack: frontend Related to the Nuxt frontend

Comments

@obulat
Copy link
Contributor

obulat commented Nov 28, 2024

Problem

Currently, the Nuxt app generates every page requested. Some pages (such as /about) are static and don't change between requests or based on the query parameters, so generating them unnecessarily taxes the CPU.

Description

Use Nuxt's Hybrid rendering to pre-render the static pages during the build time.
This is slightly complicated because the routes have locale prefixes, so we need to list all routes for all locales.

Alternatives

Keep using the CPU for all routes. I'm not sure how much of an improvement to the performance this change would bring, so it would be important to monitor the CPU/memory performance after merging it.

Additional context

The CPU is the bottleneck when we run the load tests in staging, and this might improve the performance in those tests.

@obulat obulat added ✨ goal: improvement Improvement to an existing user-facing feature 💻 aspect: code Concerns the software code in the repository 🟨 priority: medium Not blocking but should be addressed soon 🧱 stack: frontend Related to the Nuxt frontend labels Nov 28, 2024
@openverse-bot openverse-bot moved this to 📋 Backlog in Openverse Backlog Nov 28, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
💻 aspect: code Concerns the software code in the repository ✨ goal: improvement Improvement to an existing user-facing feature 🟨 priority: medium Not blocking but should be addressed soon 🧱 stack: frontend Related to the Nuxt frontend
Projects
Status: 📋 Backlog
Development

No branches or pull requests

1 participant