I have a problem with Kotlin files in android studio. when the file is too large (for example more than 2000 lines), the android studio is not responding and actually, it freezes when I try to work with it. I should mention that I have no problem with java files it exists only with Kotlin ones. Also, I've increased the IDE RAM but no luck.
I have a Kotlin file with more than 2000 lines and I cannot work it. when I open it, it stuck and freezes, I cannot even close the file anymore, I must quit the IDE and reopen it.
Is there any known issue or a way to solve this problem?