Skip to content

How can I improve performance for the "request waterfall" for Vite #213

Closed Answered by ElMassimo
jeremiah-clothier asked this question in Q&A
Discussion options

You must be logged in to vote

Hi Jeremiah! @jeremiah-clothier

Since this isn't specific to Vite Ruby, I'd encourage you to ask in the Vite.js Discussions, since there are significantly more users in the broader ecosystem.

What are some common strategies or things I should be looking at to improve performance on the "network waterfall" when the dev-server is running?

When using Vite, the initial load time will be greatly reduced if you avoid loading any code that is not critical for the current page.

  • Doing route-based code splitting, where each page is a separate dynamic import, ensures that each time you visit a page the browser only fetches the code associated with that particular page.
  • Using dynamic imports for p…

Replies: 1 comment

Comment options

You must be logged in to vote
0 replies
Answer selected by ElMassimo
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants