class usage performance....

I am using 1126 and I needed to find usages of quite a few classes (including method usages).

What I realized is that if the class had a toString method, it takes a long time, something like 3-4 minutes per class usage and the CPU is gone during this time. Of course it depends on code base and usage (duh...)

The only way I could speed this up is to comment the toString method for time being, and then do the usages. I do understand why the usage check will run slower if toString method is there but is there any other way of speeding this up than to checkout the file, comment the method, search again, then do uncheckout...seems like a little bit error prone process....

7 comments

Do you have many toString() invocations in your project?

--
Valentin Kipiatkov
Chief Scientist, Vice President of Product Development
JetBrains, Inc
http://www.jetbrains.com
"Develop with pleasure!"

"Vinay Moharil" <vmohar98@yahoo.com> wrote in message
news:28731.1075404874847.JavaMail.itn@is.intellij.net...

I am using 1126 and I needed to find usages of quite a few classes

(including method usages).
>

What I realized is that if the class had a toString method, it takes a

long time, something like 3-4 minutes per class usage and the CPU is gone
during this time. Of course it depends on code base and usage (duh...)
>

The only way I could speed this up is to comment the toString method for

time being, and then do the usages. I do understand why the usage check will
run slower if toString method is there but is there any other way of
speeding this up than to checkout the file, comment the method, search
again, then do uncheckout...seems like a little bit error prone process....


0

I believe for most of them there are 1 or 2 explicit usages of toString. Most of them might be of the form

logger.log("x is " + x);

0

Do you have many classes overriding toString() method?

--
Valentin Kipiatkov
Chief Scientist, Vice President of Product Development
JetBrains, Inc
http://www.jetbrains.com
"Develop with pleasure!"

"Vinay Moharil" <vmohar98@yahoo.com> wrote in message
news:4187783.1075408204118.JavaMail.itn@is.intellij.net...

I believe for most of them there are 1 or 2 explicit usages of toString.

Most of them might be of the form
>

logger.log("x is " + x);



0

I have 1333 classes having toString method overloaded out of a toal of 5474 classes. Is that a lot? Most of these are value object classes that get generated as part of the build process. These numbers are after the build was complete though.

BTW, when I asked IntelliJ to find all the overloaded toString methods for Object.toString, it came back with no overridden methods message. I am not sure if this is a freak incident and if it is related to class usage being slower.

0

Vinay Moharil wrote:

>I have 1333 classes having toString method overloaded ...
>

>

I guess you would appreciate this feature :
"exclude toString() from "private field xxx is assigned but never
accessed" processing."
http://www.intellij.net/tracker/idea/viewSCR?publicId=2740

It could be easily extended to "usage finding". Not that it would
necessariliy solve the slowness problem.

Alain

0

BTW, when I asked IntelliJ to find all the overloaded toString methods for

Object.toString, it came back with no overridden methods message. I am not
sure if this is a freak incident and if it is related to class usage being
slower.

This must be a bug please submit it to the tracker!

--
Valentin Kipiatkov
Chief Scientist, Vice President of Product Development
JetBrains, Inc
http://www.jetbrains.com
"Develop with pleasure!"

"Vinay Moharil" <vmohar98@yahoo.com> wrote in message
news:31087874.1075414607459.JavaMail.itn@is.intellij.net...

I have 1333 classes having toString method overloaded out of a toal of

5474 classes. Is that a lot? Most of these are value object classes that get
generated as part of the build process. These numbers are after the build
was complete though.
>

BTW, when I asked IntelliJ to find all the overloaded toString methods for

Object.toString, it came back with no overridden methods message. I am not
sure if this is a freak incident and if it is related to class usage being
slower.


0

I have 1333 classes having toString method overloaded out of a toal of

5474 classes. Is that a lot? Most of these are value object classes that get
generated as part of the build process. These numbers are after the build
was complete though.

Poor performance probably happens because of these classes defining
toString(). It may be optimized,. but not in Aurora.

--
Valentin Kipiatkov
Chief Scientist, Vice President of Product Development
JetBrains, Inc
http://www.jetbrains.com
"Develop with pleasure!"


"Vinay Moharil" <vmohar98@yahoo.com> wrote in message
news:31087874.1075414607459.JavaMail.itn@is.intellij.net...

I have 1333 classes having toString method overloaded out of a toal of

5474 classes. Is that a lot? Most of these are value object classes that get
generated as part of the build process. These numbers are after the build
was complete though.
>

BTW, when I asked IntelliJ to find all the overloaded toString methods for

Object.toString, it came back with no overridden methods message. I am not
sure if this is a freak incident and if it is related to class usage being
slower.


0

Please sign in to leave a comment.