mirror of
https://github.com/lensapp/lens.git
synced 2025-05-20 05:10:56 +00:00
Add TODO comment
Signed-off-by: Alex Andreev <alex.andreev.email@gmail.com>
This commit is contained in:
parent
28619e5690
commit
5b7d77568e
@ -457,6 +457,9 @@ export abstract class KubeObjectStore<T extends KubeObject> extends ItemStore<T>
|
||||
const items = this.getItems();
|
||||
|
||||
for (const { type, object } of this.eventsBuffer.clear()) {
|
||||
// TODO: Convert items from Array to Map to avoid doing findIndex many times per second (events delay)
|
||||
// Also, its worth to use Web Worker for such operations to prevent blocking UI
|
||||
// https://developer.mozilla.org/en-US/docs/Web/API/Web_Workers_API/Using_web_workers
|
||||
const index = items.findIndex(item => item.getId() === object.metadata?.uid);
|
||||
const item = items[index];
|
||||
|
||||
|
||||
Loading…
Reference in New Issue
Block a user