visini / obsidian-icons-plugin

Add icons to your Obsidian notes – Experimental Obsidian Plugin
188 stars 9 forks source link

Fuzzymodal loads very slow. Set a limit! #20

Open zsviczian opened 2 years ago

zsviczian commented 2 years ago

To improve the performance of FuzzyModal drastically make the following change in code. Currently, with all fonts turned on icons search opens painfully slow.

Change this:

https://github.com/visini/obsidian-icons-plugin/blob/0cb97667713d467556674d5356356ceb19c92393/src/modal.ts#L23-L27

To this:

 constructor(app: App, plugin: IconsPlugin, settings: IconsPluginSettings) { 
   super(app) 
   this.limit = 20;
   this.plugin = plugin 
   this.settings = settings 
 } 
zsviczian commented 2 years ago

For anyone else struggling with slow performance... I patched the main.js file (and compressed it with terser). Simply download this zip file, and replace main.js with its contents: main.zip