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

Investigate code splitting to reduce initial bundle size #12505

Open
8 tasks
rak-phillip opened this issue Nov 5, 2024 · 0 comments
Open
8 tasks

Investigate code splitting to reduce initial bundle size #12505

rak-phillip opened this issue Nov 5, 2024 · 0 comments
Labels
QA/dev-automation Issues that engineers have written automation around so QA doesn't have look at this

Comments

@rak-phillip
Copy link
Member

#12246 demonstrates how we might enable code splitting of dynamically imported files by replacing require.resolve() with import(). The current method of using dynamic imports is preventing code splitting and more investigation is needed to see if Dashboard can benefit from these techniques.

We might benefit from asking ourselves the following questions while investigating:

  • Are there any negative impacts from replacing require.resolve() with import()?
  • Can we further reduce the main bundle size without compromising functionality?
  • Are there specific features or pages that could benefit from more granular splitting?
  • How does our current approach affect initial load time vs. subsequent navigation?
  • Are we effectively leveraging browser caching with our current chunk strategy?

Proposed solution

  • Investigate further opportunities for code splitting
  • Optimize loading performance and user experience
  • Review and document the changes made (replacing require.resolve() with import())
  • Investigate lazy loading opportunities for routes and components
  • Consider implementing intelligent preloading for critical chunks
  • Review and optimize third-party library imports
  • Benchmark application performance before and after optimizations
  • Update documentation on our code splitting strategy

Additional notes

  • We should consider the balance between the number of chunks and chunk size
  • It's important to test these optimizations across different network conditions to assert that performance isn't negatively impacted
@github-actions github-actions bot added the QA/dev-automation Issues that engineers have written automation around so QA doesn't have look at this label Nov 5, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
QA/dev-automation Issues that engineers have written automation around so QA doesn't have look at this
Projects
None yet
Development

No branches or pull requests

1 participant