Extremely poor performance of the Kotlin plugin for Eclipse



Not sure if this is the right place to report this, but seeing huge speed / memory allocation / leak problems when using Kotlin code of moderate size in Eclipse. The code is approximately 400 files, and about 20 KLOC. The code is referenced from a partner Java project.

When modifying Kotlin files in the workspace (all tend to be updated at once as testing cogen), I see the message in the build window:

“Update occurance annotations”.

Then it maxes out the CPU for about 2-4 minutes, meanwhile I can do nothing. The project isn’t that big.

This is the version of the Kotlin plugin:

I’m running on a machine with 12GB RAM, and The JVM is allocating 5GB for eclipse for Kotlin. It’s a 3.2Ghz i5 chip.

If there is a place to report this kind of issue, please direct me to the right place. Really loving Kotlin as a language but this issue is making me wonder if the syntactic sugar carries an IDE overhead makes it unsuitable for larger projects?


I have investigated this issue and the reason this is happening is the way that the asynchronous task ‘Update occurance annotations’ is executed. This task is executed on every change of cursor position or text under cursor, regardles how frequent these changes are and whether the change has any effect on highligted identifiers.

This could be done to improve this situation:

  1. You should be able to turn off highligting completely
  2. There should be some delay before running the background task, so tho task will run after some user inactivity.
  3. Do not allow multiple simultaneous backround task of this type. Abort previous task before running another.
  4. Investigate whether it is possible to improve this task performance - it is slow event if it runs only once and subsequent runs are as slow as the first run, so there must be some way to cache previous results (if they are aplicable) in some way.

I have seen code of scala eclipse plugin and it provides functionality that I have described above. I will try to do it myself, but I do not promise anything becouse time is precious to me :o)


Thank you for the explanation. It’s good to have it confirmed that I’m not imagining it.