jlagerweij / cucumber-kotlin

Jetbrains plugin for Cucumber step definitions written in Kotlin
https://plugins.jetbrains.com/plugin/10527-cucumber-for-kotlin
Other
20 stars 16 forks source link

Background tasks "Process elements with word" runs very often and slows IntelliJ down #45

Open wbuijsman opened 1 year ago

wbuijsman commented 1 year ago

I have been noticing that a set of around 500ish background tasks runs very often, also while running tests. This greatly slows down IntelliJ. Can this behaviour be optimised? It seems to take up a lot of CPU.

I'm not sure what the function of these background tasks are, because they also seem to run when steps or scenarios have not changed.

image image

It seems that this commit is the cause https://github.com/jlagerweij/cucumber-kotlin/commit/bb4cca4daef2af338384fbf5beace0671633e774, it matches the time when this first started occurring.

jlagerweij commented 1 year ago

As I cannot reproduce this myself, allowing the background process to be cancelled might be a good option. So I changed that in the 2022.3.0 version. Let me know if that helps.

wbuijsman commented 1 year ago

I appreciate the attempt, but sadly that does not help, as there are hundreds of backgrounds tasks being created and resolved continuously, so cancelling one is not going to matter. The process also seems to run every time there is an automatic save of the file by IntelliJ, e.g. when losing focus of the window, or after short periods of inactivity.

it is very noticeable in feature files that have >300 lines. We use regex in our step definitions, but it is usually quite simple stuff like ^I have an (agent|agent2|insufficient access agent|agent hybrid mode|agent calendar view|agent read all|empty) token$

Is there any other information I can give you to help you reproduce?

vrnvorona commented 1 year ago

Same issue. Every time I type in .feature file it runs a lot of "process elements". Also, code completion doesn't work well with regex

For example simple ^I have (?:x|y)$ won't work and won't suggest neither x nor y

jlagerweij commented 1 year ago

To be fair, I cannot find the time to get to fixing any bugs. Perhaps this plugin does things better, it does support Kotlin: https://plugins.jetbrains.com/plugin/16289-cucumber-