mirror of
				https://github.com/zadam/trilium.git
				synced 2025-11-03 20:06:08 +01:00 
			
		
		
		
	add note attribute cache to speed up tree loading
This commit is contained in:
		@@ -6,6 +6,7 @@ import Branch from "../entities/branch.js";
 | 
			
		||||
import Attribute from "../entities/attribute.js";
 | 
			
		||||
import options from "./options.js";
 | 
			
		||||
import treeCache from "./tree_cache.js";
 | 
			
		||||
import noteAttributeCache from "./note_attribute_cache.js";
 | 
			
		||||
 | 
			
		||||
const $outstandingSyncsCount = $("#outstanding-syncs-count");
 | 
			
		||||
 | 
			
		||||
@@ -359,6 +360,10 @@ async function processSyncRows(syncRows) {
 | 
			
		||||
    });
 | 
			
		||||
 | 
			
		||||
    if (!loadResults.isEmpty()) {
 | 
			
		||||
        if (loadResults.hasAttributeRelatedChanges()) {
 | 
			
		||||
            noteAttributeCache.invalidate();
 | 
			
		||||
        }
 | 
			
		||||
 | 
			
		||||
        const appContext = (await import("./app_context.js")).default;
 | 
			
		||||
        await appContext.triggerEvent('entitiesReloaded', {loadResults});
 | 
			
		||||
    }
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user