Skip to content

Improve startup performance by using promise.all when processing rooms from sync#5095

Merged
MidhunSureshR merged 3 commits into
developfrom
midhun/performance/room-processing
Jan 27, 2026
Merged

Improve startup performance by using promise.all when processing rooms from sync#5095
MidhunSureshR merged 3 commits into
developfrom
midhun/performance/room-processing

Conversation

@MidhunSureshR
Copy link
Copy Markdown
Member

When EW starts, it first processes a huge sync response from the sync accumulator. Testing on my account, a large chunk of the work is just processing the joined rooms. We can improve the performance of this code if we switch to promise.all.

Shaves off more than 20 seconds from startup time on my account (30-35 seconds vs 10 seconds).

Copy link
Copy Markdown
Member

@richvdh richvdh left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks sensible

@MidhunSureshR MidhunSureshR requested a review from ara4n January 7, 2026 12:14
@ara4n
Copy link
Copy Markdown
Member

ara4n commented Jan 26, 2026

this sped up my launch time by 6x and didn't OOM anything. shipit!

@MidhunSureshR MidhunSureshR marked this pull request as ready for review January 27, 2026 08:36
@MidhunSureshR MidhunSureshR requested a review from a team as a code owner January 27, 2026 08:36
@MidhunSureshR MidhunSureshR requested review from dbkr and t3chguy January 27, 2026 08:36
@MidhunSureshR MidhunSureshR added this pull request to the merge queue Jan 27, 2026
Merged via the queue into develop with commit 82b51d0 Jan 27, 2026
32 checks passed
@MidhunSureshR MidhunSureshR deleted the midhun/performance/room-processing branch January 27, 2026 09:16
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants