Skip to content

Discovery: developer bundle analysis and optimization #655

Closed

Description

@codecovdesign

Problem

With modern web development, JavaScript bundles have become substantial parts of applications. As applications grow and become more complex, so do their bundles. However, the direct correlation between bundle size and application performance means that every byte counts. Without clear insights and easy-to-use tools, developers might inadvertently hamper the performance of their applications. Developer problem to solve and goal:

"When I'm developing a web application, I want to easily understand and optimize my JavaScript bundle sizes so that I can ensure the best performance and user experience without unnecessary complexities or extensive configurations."

Developers strive for efficient and performant web applications, and JavaScript bundling plays a crucial role in achieving this to help developers with:


  • Awareness: not all developers are fully aware of how bundle size impacts the performance and user experience of their applications. They might be introducing inefficiencies unintentionally.
  • Comprehensive insights: While some developers might use local tools like webpack-bundle-analyzer for initial insights, they might be missing out on historical data, trends, and comparative analyses that can provide deeper insights.
  • Dependency trade-offs: developers often need to evaluate whether adding a certain dependency is worth the potential increase in bundle size, but without insights, this becomes a guessing game.

The overarching issue is the potential disconnect between development actions (like adding dependencies or changing code) and their impact on the final product's efficiency and performance. While developers aim to build the best applications, they might lack the tools or awareness to make informed decisions related to bundle optimization.

Solution

🎨 Latest designs for review

bundle_MVP.mov
previous designs
### Tasks
- [ ] https://github.com/codecov/engineering-team/issues/803

Activity

  1. added
    in discovery
    on Oct 6, 2023
  2. self-assigned this
    on Oct 6, 2023
  3. codecovdesign commented on Nov 6, 2023

    @codecovdesign
    ContributorAuthor

    We'd like your feedback

    • 🤔 Would this fit into your workflow? Why or why not?
    • 💰 Is it something you'd pay for?
    • 🛑 Not useful? We're all ears—tell us why!
  4. codecovdesign commented on Nov 17, 2023

    @codecovdesign
    ContributorAuthor
  5. codecovdesign commented on Nov 28, 2023

    @codecovdesign
    ContributorAuthor

    related feedback from separate interview, though bundles was brought up: #480 (comment)

  6. codecovdesign commented on Nov 28, 2023

    @codecovdesign
    ContributorAuthor

    related feedback from: https://twitter.com/bartveneman

    interview notes

    What Is Your Current Experience Managing Bundles?

    • Uses Webpack for a Gatsby static site; bundles are large and code splitting is challenging.
    • Orchestration of bundling in Gatsby is complex.

    Webpack Analyzer & Lighthouse (current bundle management tools)

    • Issues: Doesn't explain why a dependency exists. Hard to track changes for identifying performance issues.
    • Likes: Visibility of changes before and after, even before PRs.
    • Dislikes: UI is difficult to navigate.
    • Uses SpeedCurve for performance tracking but lacks bundle tracking.
    • Prefers visual graphs for presenting data to leadership.

    What Is Your Dream Bundle Product?

    • Alerting in PR for significant bundle size increases.
    • Tracking new dependencies and alerting upon additions.
    • A Sentry-like interface or email alerts would be preferred; but wasn't sure, just wants some notification.

    Prototype Review

    • Appreciates PR comment approach.
    • References the bundle-gate concept as simliar from Size Limit.
    • Size Limit was useful but challenging to maintain, especially with Gatsby (what team uses).

    PR Comment

    • Prefers seeing total and transferred size like in Firefox browser tools.
    • Skeptical about load metrics due to varying conditions.
    • Favors failure checks in GitHub Actions for size limits but doesn't want it to block work - more as a conversation starter with the author.

    In-App UI

    • Values trend analysis and size sorting.
    • Skeptical about execution time metrics; prefers concrete data like bundle size.
    • Finds it useful to be able to sort by size and see bundle composition.
    • Likes the ability to check changes by branch and pre-production impact.

    Closing: would love to keep in touch about progress and adopt tool when MVP is ready.

  7. codecovdesign commented on Dec 14, 2023

    @codecovdesign
    ContributorAuthor

    MVP design review

    View design file

    bundle_MVP.mov
  8. added
    Dev-Ready
    on Dec 19, 2023
  9. added
    [Epic]
    on Dec 19, 2023
  10. codecovdesign commented on Mar 5, 2024

    @codecovdesign
    ContributorAuthor

    closing this issue since MVP is going toward release: #927
    ongoing discovery for next steps here: #1121

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

Dev-Ready[Epic]in discovery

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions