Generify refactoring never finishes. Please help need it badly

Hello

I have a major refactoring under way and I need to generify my project. I
relied on Generify refactoring but unfortunately it does not seem to work.
It never finishes. It gets stuck on "Looking for Usages" and just stays
there forewer with CPU running at 100%

Thanks

Alex






9 comments

Hello Alex,

I have a major refactoring under way and I need to generify my
project. I relied on Generify refactoring but unfortunately it does
not seem to work. It never finishes. It gets stuck on "Looking for
Usages" and just stays there forewer with CPU running at 100%


Thread dump please?

--
Dmitry Jemerov
Software Developer
JetBrains, Inc.
http://www.jetbrains.com/
"Develop with Pleasure!"


0

could you please remind me how to get the dump on windows (I run idea as
batch file because I run 64 bit JVM)

"Dmitry Jemerov" <yole@jetbrains.com> wrote in message
news:431b0f66301d78c97c0d6f5f182c@news.jetbrains.com...

Hello Alex,

>
>> I have a major refactoring under way and I need to generify my
>> project. I relied on Generify refactoring but unfortunately it does
>> not seem to work. It never finishes. It gets stuck on "Looking for
>> Usages" and just stays there forewer with CPU running at 100%
>

Thread dump please?

>

--
Dmitry Jemerov
Software Developer
JetBrains, Inc.
http://www.jetbrains.com/
"Develop with Pleasure!"

>



0

Hello Alex,

Ctrl-Break in the console

could you please remind me how to get the dump on windows (I run idea
as batch file because I run 64 bit JVM)

"Dmitry Jemerov" <yole@jetbrains.com> wrote in message
news:431b0f66301d78c97c0d6f5f182c@news.jetbrains.com...

>> Hello Alex,
>>
>>> I have a major refactoring under way and I need to generify my
>>> project. I relied on Generify refactoring but unfortunately it does
>>> not seem to work. It never finishes. It gets stuck on "Looking for
>>> Usages" and just stays there forewer with CPU running at 100%
>>>
>> Thread dump please?
>>
>> --
>> Dmitry Jemerov
>> Software Developer
>> JetBrains, Inc.
>> http://www.jetbrains.com/
>> "Develop with Pleasure!"
--
Dmitry Jemerov
Software Developer
JetBrains, Inc.
http://www.jetbrains.com/
"Develop with Pleasure!"


0

Attached 4 consequent dumps (few seconds apart)

"Alex Roytman" <nospam@domain.com> wrote in message
news:f4p4ih$rs$1@is.intellij.net...

Hello

>

I have a major refactoring under way and I need to generify my project. I
relied on Generify refactoring but unfortunately it does not seem to work.
It never finishes. It gets stuck on "Looking for Usages" and just stays
there forewer with CPU running at 100%

>

Thanks

>

Alex

>
>
>
>
>









Attachment(s):
stack3.txt
stack4.txt
stack1.txt
stack2.txt
0

Hello Dmitry,

Thank you very much for looking intothe issue.
Here is another dump. I used -l option of jstack.exe which is supposed to
provide more info not sure if it really does.

Alex


"Alex Roytman" <nospam@domain.com> wrote in message
news:f4p6ba$ld3$1@is.intellij.net...

Attached 4 consequent dumps (few seconds apart)

>

"Alex Roytman" <nospam@domain.com> wrote in message
news:f4p4ih$rs$1@is.intellij.net...

>> Hello
>>
>> I have a major refactoring under way and I need to generify my project. I
>> relied on Generify refactoring but unfortunately it does not seem to
>> work.
>> It never finishes. It gets stuck on "Looking for Usages" and just stays
>> there forewer with CPU running at 100%
>>
>> Thanks
>>
>> Alex
>>
>>
>>
>>
>>
>>
>
>







Attachment(s):
stack1.txt
stack2.txt
0

Alex,
this refactoring is indeed somewhat long running. Depending on your project size it could run for several hours, so if you have a free machine for this time and somewhat around -Xmx400m it might be a good idea to leave it running overnight.
Alternatively you could try it on lesser scope, e.g. generifying package by package. It won't be as precise, but will be definitely faster.

Disclaimer: I don't work in IDEA team anymore so my knowledge might not be 100% up to date.

0

Thank you Eugene,

I am trying class by class not even package by package. Most classes
refactor instaneniously but there is one class on which it had been sitting
for 30 minutes now.

Also looks like it does not refactor interfaces only implementations. Too
bad I extracted all the interfaces (with implementation rename) first :(

Alex

"Eugene Vigdorchik" <no_reply@jetbrains.com> wrote in message
news:27840997.1181758044184.JavaMail.itn@is.intellij.net...

Alex,
this refactoring is indeed somewhat long running. Depending on your
project size it could run for several hours, so if you have a free machine
for this time and somewhat around -Xmx400m it might be a good idea to
leave it running overnight.
Alternatively you could try it on lesser scope, e.g. generifying package
by package. It won't be as precise, but will be definitely faster.

>

Disclaimer: I don't work in IDEA team anymore so my knowledge might not be
100% up to date.



0

It does refactor interfaces when you generify them together with their usages.
As for a single class where refactoring hangs, you would do us a favor if you posted a jira with sample code to reproduce.

Eugene.

0

Eugene,

The class has finished. Took 15-20 minutes on my 2Core AMD Opteron and
result was a bit weird.

Will a single class help you or you need the entire project?

Alex

"Eugene Vigdorchik" <no_reply@jetbrains.com> wrote in message
news:29433314.1181760535714.JavaMail.itn@is.intellij.net...

It does refactor interfaces when you generify them together with their
usages.
As for a single class where refactoring hangs, you would do us a favor if
you posted a jira with sample code to reproduce.

>

Eugene.



0

Please sign in to leave a comment.