leodevbro / vscode-blockman

VSCode extension to highlight nested code blocks
https://github.com/leodevbro/vscode-blockman
MIT License
345 stars 16 forks source link

Support `extensions.experimental.affinity` to speed up extension #126

Open fujidaiti opened 8 months ago

fujidaiti commented 8 months ago

VSCode allows extensions to run in their own thread. Some famous extensions already use this feature to improve their performance (e.g. VSCode Neovim). However, adding Blockman to extensions.experimental.affinity in settings.json seems to make it stop working:

"extensions.experimental.affinity": {
    "leodevbro.blockman": 1
}

Does anyone have a good idea?

leodevbro commented 5 months ago

Hello, with the affinity 1, Blockman seems working fine for HTML tag blocks, but does not render blocks for brackets (curly/round/square). I guess the reason is WASM, I mean Blockman uses source code of Bracket Pair Colorizer 2 and BPC2 itself uses .wasm (web assembly) file for fast analyzation of brackets. Maybe somehow the loading mechanism of WASM does not work with the affinity. I'll try to investigate it when I have time.