antfu / vscode-iconify

🙂 Iconify IntelliSense for VS Code

Home Page:https://marketplace.visualstudio.com/items?itemName=antfu.iconify

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Storing cache in globalState is causing slow startup

Legend-Master opened this issue · comments

commented

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

  • Follow our Code of Conduct
  • Read the Contributing Guide.
  • Check that there isn't already an issue that reports the same bug to avoid creating a duplicate.
  • Check that this is a concrete bug. For Q&A, please open a GitHub Discussion instead.
  • The provided reproduction is a minimal reproducible of the bug.

PR welcome if you have better solutions. Thanks

commented

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