perf: optimize Tasker boot and kanban load

This commit is contained in:
DCCONSTRUCTIONS
2026-05-15 19:18:25 +03:00
parent 44d2c5dd27
commit 83ea515962
29 changed files with 631 additions and 186 deletions
+12 -5
View File
@@ -7,14 +7,21 @@
// store
import { CoreRootStore } from "@/store/root.store";
import type { ITimelineStore } from "./timeline";
import { TimeLineStore } from "./timeline";
export class RootStore extends CoreRootStore {
timelineStore: ITimelineStore;
timelineStore: ITimelineStore | undefined;
private timelineStorePromise: Promise<ITimelineStore> | undefined;
constructor() {
super();
loadTimelineStore = async (): Promise<ITimelineStore> => {
if (this.timelineStore) return this.timelineStore;
this.timelineStore = new TimeLineStore(this);
if (!this.timelineStorePromise) {
this.timelineStorePromise = import("./timeline").then(({ TimeLineStore }) => {
this.timelineStore = new TimeLineStore(this);
return this.timelineStore;
});
}
return this.timelineStorePromise;
}
}