mocha-sidebar icon indicating copy to clipboard operation
mocha-sidebar copied to clipboard

Performance optimizations

Open ilearnio opened this issue 6 years ago • 4 comments

It works but needs optimizations. I am not sure what this plugin does in the background but my mac mac become super slow after I installed it, my fan/cooler turns like crazy. It looks like it calls mocha every once in a while even though I still need to manually click green play button to re-run tests. Would be great if there would be a way to run a watch process for some describe block (with mocha "--watch" option), and whenever an update happens it will instantly reflect statuses of all nested test cases in mocha sidebar.

Also when pressing "Run tests from this level" button on some describe block, it runs every test case individually which is a quite long process especially when using ts-node/register compiler that should pre-compile a bunch of code. I wonder why not to test everything inside that describe block at once

ilearnio avatar Mar 02 '19 08:03 ilearnio

It seems like the lens feature hits the performances a lot.

Nautigsam avatar Mar 05 '19 10:03 Nautigsam

BTW you can disable it from the settings incase u missed it but I will check it .

On Tue, Mar 5, 2019, 12:02 PM Aurélien Bertron [email protected] wrote:

It seems like the lens feature hits the performances a lot.

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/maty21/mocha-sidebar/issues/172#issuecomment-469618253, or mute the thread https://github.com/notifications/unsubscribe-auth/AE_nuT9j_HCfaZAG5DU6A1CwbuCFSfGJks5vTkCZgaJpZM4baQm0 .

maty21 avatar Mar 05 '19 10:03 maty21

I was having performance issues too. I disabled decoration, lens and extend the refresh interval and it's now much better. My new settings were:

"mocha.sideBarOptions": { "lens": false, "decoration": false, "autoUpdateTime": 5000, "showDebugTestStatus": true }

My old settings were:

"mocha.sideBarOptions": { "lens": true, "decoration": true, "autoUpdateTime": 2000, "showDebugTestStatus": true }

I'm not sure which change made the most difference but they all had some impact. Play around until you're happy with the balance of features and performance.

Recodify avatar Jun 04 '19 11:06 Recodify

I checked that it seems to be the problem of VIM. VIM does not work well with this. If I disable VIM it is fine.

DingXuefeng avatar Nov 24 '20 09:11 DingXuefeng