basementuniverse / vscode-kanbn

A VSCode extension for kanbn
MIT License
55 stars 13 forks source link

The window stops working sometimes #7

Closed fanshibear closed 3 years ago

fanshibear commented 3 years ago

Hello,

The window stops working sometimes after dragging or saving a few cards and items become unclickable. It usually recovers in about ten seconds.

basementuniverse commented 3 years ago

Hi @fanshibear, thanks for reporting this - it has happened a few times on my machine too. I suspect there are memory leaks in the board component (or I'm missing a useState / useCallback hook somewhere).

I'll do some profiling / optimisation, and will hopefully have an update ready soon.

basementuniverse commented 3 years ago

I have released 0.9.3 which should hopefully sort out the performance bug.

As I suspected, I wasn't adding the Webview message event handler inside a useEffect hook, so every time the board got updated it was adding a new event handler on top of the old one. This was causing the UI to freeze pretty quickly!

I have done some manual performance testing and it seems to be working quite well now. Please let me know if the bug still occurs after you've updated the extension :smile:

Thanks!

fanshibear commented 3 years ago

It works well on my computer now. I like it better 😄

Thanks!