various widget optimizations for faster note switching

This commit is contained in:
zadam
2020-02-03 21:16:33 +01:00
parent 66204811cf
commit 44ddcdd852
13 changed files with 111 additions and 96 deletions

View File

@@ -29,21 +29,8 @@ async function executeStartupBundles() {
}
}
async function executeRelationBundles(note, relationName, tabContext) {
note.bundleCache = note.bundleCache || {};
if (!note.bundleCache[relationName]) {
note.bundleCache[relationName] = await server.get("script/relation/" + note.noteId + "/" + relationName);
}
for (const bundle of note.bundleCache[relationName]) {
await executeBundle(bundle, note, tabContext);
}
}
export default {
executeBundle,
getAndExecuteBundle,
executeStartupBundles,
executeRelationBundles
executeStartupBundles
}