You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
SanjalKatiyar
changed the title
[perf-improv] no need to "await", save up extra API call(s)
[perf-improv] No need to "await", save up extra API call(s)
Feb 26, 2024
No need to "await" here: https://github.com/red-hat-storage/odf-console/blob/master/packages/mco/features.ts#L130
If we do, "intervalId" (here: https://github.com/red-hat-storage/odf-console/blob/master/packages/mco/features.ts#L131) will not be set until above "await" resolves, which will eventually lead to "featureDetector" be executed once again.
Without "await", "intervalId" will be set immediately and as soon as "featureDetector" gets resolved for the first time it will clear the interval as well (preventing callback in "setInterval" from being executed).
The text was updated successfully, but these errors were encountered: