Refactoring has gotten way slow

In some recent builds I find that refactoring is so slow that I can't use it. Renaming a variable in method scope takes tens of seconds. Renaming a package simply hangs forever. I'll try to muster up some stack traces.

5 comments
Comment actions Permalink

I can't reproduce it. Renaming packages works about 3-4 seconds. So I need snapshot for fixing it.
Which plugin version are you using?

Best regards,
Alexander Podakhyuzin.

0
Comment actions Permalink

version 0.4.1223

I created an empty package, then immediately tried to rename it. The find dialog comes up and never finishes. Eventually I have cancel the find part of the rename refactoring.

Attached are bunch of thread dumps while the find dialog was "finding". I don't see any runaway stacks though.



Attachment(s):
td5.txt.zip
td4.txt.zip
td3.txt.zip
td2.txt.zip
td1.txt.zip
0
Comment actions Permalink

As I see, there are some problems with JavaScript. Do you have some js files? Can you send them for us to check parsing of it?
Is behavior the same if you use different package names? I mean you can get problematic js file by Ctrl+Shift+F search on problematic package name.

Best regards,
Alexander Podkhalyuzin.

0
Comment actions Permalink

One of my modules is a very large sproutcore applications. I removed the sproutcore module and redid the test. The rename was immediate.

This module has hundreds of js files. I can send them privately if you really want though. Or is there a better way for me narrow this down for you?

-barry

0
Comment actions Permalink

It seems current behavior is expected with JavaScript files, so you do not need to send this module.
You can create appropriate issue in IDEA project then JavaScript developers will think is it possible to do something (maybe scoping).
How work rename in IntelliJ IDEA:
1. Collect all words based on full text search.
2. Check for every element after parsing containing file is this is a reference to package/class etc.
3. Rename all elements which satisfy to 2.

So step 2. needs parsing of all such files. So if word is very simple then you will get performance problem, becuase of not really fast parsing.

Best regards,
Alexander Podkhalyuzin.

0

Please sign in to leave a comment.