Skip to content

Performance issue with large collections: UI freezes with thousands of requests #8562

Description

@zhangqxgz

Description

When a Bruno project contains thousands of requests (APIs), the application becomes extremely sluggish and UI freezes occur. Opening the application or expanding folders causes severe performance degradation.

However, if the requests are split into multiple separate Bruno projects (by adding \�runo.json\ to subfolders), the performance is normal. This indicates that the performance bottleneck is caused by loading and rendering a massive number of requests in a single project.

Cause

Upon investigating the codebase, it appears that the \Sidebar\ collections list renders the tree recursively (\CollectionItem\ renders its children components directly). When a folder containing thousands of requests is expanded, thousands of DOM nodes are mounted simultaneously without any virtualization.

Proposed Solution

Since
eact-virtuoso\ is already a dependency in \�runo-app, we can optimize the \Sidebar\ by flattening the collections tree and using \Virtuoso\ to render only the visible items (Virtual Scrolling).

I have already implemented a proof-of-concept locally that:

  1. Flattens the collections tree based on the \collapsed\ state.
  2. Replaces the recursive rendering in the Sidebar with <Virtuoso>.

This completely eliminates the UI freeze. I would love to submit a PR for this! Should I go ahead and open the PR for review?

Metadata

Metadata

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions