Skip to content

[HOLD for payment 2024-07-10] [HOLD for payment 2024-07-02] [$250] [HOLD for Payment 2024-06-21] LOW: [Performance] Improve the performance of getCachedCollection #41895

Description

@mountiny

Slack here

Problem

We have many calls to keysChanged function throughout the session and on an average it will be around ~800 ms. That’s a lot for a function which is called this many times. From the trace, this function is called roughly around 15 times.

Inside of this function we have getCachedCollection , which first calls Array.from on the Set then filter it out and then reduce the returned value.

Solution

We can improve this by doing only 1 loop directly on Set as it gives us forEach.

cc @hurali97

Issue OwnerCurrent Issue Owner: @
Upwork Automation - Do Not Edit
  • Upwork Job URL: https://www.upwork.com/jobs/~0145b3587af847aed1
  • Upwork Job ID: 1804230619308310738
  • Last Price Increase: 2024-06-21
Issue OwnerCurrent Issue Owner: @puneetlath

Metadata

Metadata

Labels

Awaiting PaymentAuto-added when associated PR is deployed to productionBugSomething is broken. Auto assigns a BugZero manager.ExternalAdded to denote the issue can be worked on by a contributorHelp WantedApply this label when an issue is open to proposals by contributorsWeeklyKSv2

Type

No type

Fields

No fields configured for issues without a type.

Projects

Status
Done

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions