antfu / vscode-iconify

🙂 Iconify IntelliSense for VS Code
https://marketplace.visualstudio.com/items?itemName=antfu.iconify
MIT License
453 stars 33 forks source link

Storing cache in globalState is causing slow startup #48

Closed Legend-Master closed 1 year ago

Legend-Master commented 1 year ago

Describe the bug

We're storing icon cache in globalState, and it will be saved to globalStorage/state.vscdb which gets loaded in every startup even after uninstall

I discovered this when trying to troubleshoot why my vscode is starting slowly recently, and found something related in loading storage in perfview.show, and saw this big cache entry in it, removing it solves the problem

Reproduction

Try use some icons and use perfview.show to see code/didInitStorage's delta time

System Info

* Code: 1.79.2 (695af097c7bd098fbf017ce3ac85e09bbc5dda06)
* OS: win32(10.0.19045)
* CPUs: 11th Gen Intel(R) Core(TM) i5-11400 @ 2.60GHz(12 x 2592)
* Memory(System): 15.83 GB(6.97GB free)

- 1TB M.2 SSD

Used Package Manager

n/a

Validations

antfu commented 1 year ago

PR welcome if you have better solutions. Thanks

Legend-Master commented 1 year ago

I'll take a look, maybe using the way how built-in json language features extension store schema caches