IG: equals() between objects of inconvertible types

.... could have saved me from a bug today, but it wasn't enabled :(

Shouldn't this be on by default? I guess the risk for false positives isn't too high and
can save a lot if time ;)

Sascha

6 comments
Comment actions Permalink

equals()/cast/instanceof between inconvertible types seem pretty stable, haven't thrown too many false positives, and would be excellent candidates for default enablement, except that they are algorithmically in the slowest percent or so of inspections. This is necessary because they may have to search the inheritance hierarchy to see if two interfaces have any common implementations. Policy is that slow inspections are not enabled by default, so that if anyone opens up IDEA and has a "nice, but too slow" user experience, it's not my fault.

Glad you like it. It's one of my favorites that are going into Irida.

--Dave Griffith

0
Comment actions Permalink

Dave Griffith wrote:

equals()/cast/instanceof between inconvertible types seem pretty stable, haven't thrown too many false positives, and would be excellent candidates for default enablement, except that they are algorithmically in the slowest percent or so of inspections. This is necessary because they may have to search the inheritance hierarchy to see if two interfaces have any common implementations. Policy is that slow inspections are not enabled by default, so that if anyone opens up IDEA and has a "nice, but too slow" user experience, it's not my fault.

Glad you like it. It's one of my favorites that are going into Irida.

--Dave Griffith


Any chance you have a sorted list of inspections from slowest to fastest
(on average) so people could know what ones may be slowing down
performance? E.g. if someone decides to turn on all of the inspections
and then notices IDEA is much slower, which are the likely culprits that
might be turned off to improve performance?

--
Rob Harwood
Software Developer
JetBrains Inc.
http://www.jetbrains.com
"Develop with pleasure!"

0
Comment actions Permalink


Pick a big project, turn on all inspections, run a batch inspection over everything, look at the IG telemetry window.

--Dave Griffith

0
Comment actions Permalink


>Pick a big project, turn on all inspections, run a batch inspection over everything, look at the IG telemetry window.
>

>

Unfortunately, it's only IG telemetry, and not IDEA's inspections
telemetry. It should really 1°/ be part of the core, and 2°/be available
for all 3rd-party plugins, and not only IG.

Alain

0
Comment actions Permalink

equals()/cast/instanceof between inconvertible types
seem pretty stable, haven't thrown too many false
positives, and would be excellent candidates for
default enablement, except that they are
algorithmically in the slowest percent or so of
inspections. This is necessary because they may
have to search the inheritance hierarchy to see if
two interfaces have any common implementations.
Policy is that slow inspections are not enabled by
y default, so that if anyone opens up IDEA and has a
"nice, but too slow" user experience, it's not my
fault.

Glad you like it. It's one of my favorites that are
going into Irida.


These inspections are great things. One thing I find however is that there's just so damn many of them that it takes forever to determine which ones to turn on.

It would be nice to have some sort of "good but slow" category. :)


0
Comment actions Permalink

Dave Griffith wrote:

Pick a big project, turn on all inspections, run a batch inspection
over everything, look at the IG telemetry window.


"Constant conditions & exceptions" is very slow for me most of the time.
This one is not mentioned in the telemetry window. I think it takes
about the time of all other inspections I have enabled combined. And I
probably have about 270 inspections on all of the time.

Bas

0

Please sign in to leave a comment.