4.5 a step backwards

Our development team has reverted back to version 4.0.x due to the
scanning dependencies and recompilation 'feature' of version 4.5

We work with a very large project (>10'000 classes) very happily with
version 4.0.x. When we compile one class it compiles that only that class
and we are happy. With version 4.5 when we compile a class Idea embarks on
a mission to analyse dependencies. This can take a few minutes. Once
analysed it then compiles all dependent classes including all recursively
dependent classes. When compiling a high level class this can take another
few minutes. The result is that compiling some classes can result in 5-10
minute wait. Faced with this form of 'compiler russian roulette' we have
moved back to version 4.0.x

Is there any means of switching off this new behaviour in version 4.5?

8 comments

Why not compiling everything once and then repeateadly use "make project (Ctrl-F9)" or "make module" feature? That will compile only
modified files and the ones that depend on them.
The "search dependencies" modification you are describing has been added after a lot of complaints that IDEA compiled only
explicitly selected classes and not the classes they depend on.

--
Best regards,
Eugene Zhuravlev
Software Developer
JetBrains Inc.
http://www.jetbrains.com
"Develop with pleasure!"


"Gareth Thorburn" <nomail@noserver.com> wrote in message news:opsdulcgb0adjrxw@thorburn-bbrf5w...
Our development team has reverted back to version 4.0.x due to the
scanning dependencies and recompilation 'feature' of version 4.5

We work with a very large project (>10'000 classes) very happily with
version 4.0.x. When we compile one class it compiles that only that class
and we are happy. With version 4.5 when we compile a class Idea embarks on
a mission to analyse dependencies. This can take a few minutes. Once
analysed it then compiles all dependent classes including all recursively
dependent classes. When compiling a high level class this can take another
few minutes. The result is that compiling some classes can result in 5-10
minute wait. Faced with this form of 'compiler russian roulette' we have
moved back to version 4.0.x

Is there any means of switching off this new behaviour in version 4.5?


0

Gareth Thorburn wrote:

When compiling a high level class
this can take another few minutes. The result is that compiling some
classes can result in 5-10 minute wait.


As far as I can tell, if you right-click a file and select Compile
(Ctrl-Shift-F9), it only compiles the one file. Correct me if I'm wrong.

But there's actually a better solution, in my opinion: See
http://c2.com/cgi/wiki?DependencyInversionPrinciple and also
http://www.amazon.com/exec/obidos/tg/detail/-/0135974445/

If a class that you change frequently has lots of dependents, then
introduce an abstraction (abstract base class or interface) to invert
the dependency.
E.g. Many classes use class Foo. Consequently, frequent changes to Foo
cause lots of recompilation. Introduce an interface Bar, and change the
dependent classes so that they depend on Bar instead of Foo. Foo also
depends on Bar (Foo implements Bar), but Bar does not depend on Foo.
Result: Changing Foo no longer affects clients of the interface.

There is a single refactoring in IDEA, called Extract Interface (or
alternatively Extract Superclass), which can perform this modification.

Sometimes you will have to introduce a factory, or pass in an instance
of the interface to the clients to remove all dependencies, but it is
usually worth it to make the separation complete.

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

0

Eugene,

I can understand your reasons for adding this. However, in this (rather extreme) case we actually prefer the previous behaviour. In smaller projects however, I would very much appreciate the dependency checker as the overhead would be negligible.

Could you not make the use of the dependency checker optional (i.e. A simple setting in the project compiler settings). This would give people the choice of whether they want to use the new behaviour or not: the best of both worlds.


Rob,

Pressing Ctrl-Shift-F9 does seem to initiate a pre-compilation phase of dependency analysis to determine which files may need to be compiled.

Whilst the pattern of dependency inversion is a good one I don't really want to have to redesign many classes within a large project simply to use a later version of the IDE effectively.

Again, the preffered and simplest solution would be an option enabling users to switch off the pre-compilation dependency check.

Gareth

0

Gareth Thorburn wrote:

Pressing Ctrl-Shift-F9 does seem to initiate a pre-compilation phase of dependency analysis to determine which files may need to be compiled.


Oops, I didn't check quite the right conditions. You are right.

Whilst the pattern of dependency inversion is a good one I don't really want to have to redesign many classes within a large project simply to use a later version of the IDE effectively.


Of course, that's not the ONLY reason to use dependency inversion! ;)

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

0

Could you please sumbit an SCR for optional dependency checks?

--
Best regards,
Eugene Zhuravlev
Software Developer
JetBrains Inc.
http://www.jetbrains.com
"Develop with pleasure!"

"Gareth Thorburn" <Gareth.Thorburn@db.com> wrote in message news:4836764.1094548832516.JavaMail.itn@is.intellij.net...

Eugene,

>

I can understand your reasons for adding this. However, in this (rather extreme) case we actually prefer the previous behaviour.

In smaller projects however, I would very much appreciate the dependency checker as the overhead would be negligible.
>

Could you not make the use of the dependency checker optional (i.e. A simple setting in the project compiler settings). This would

give people the choice of whether they want to use the new behaviour or not: the best of both worlds.
>
>

Rob,

>

Pressing Ctrl-Shift-F9 does seem to initiate a pre-compilation phase of dependency analysis to determine which files may need to

be compiled.
>

Whilst the pattern of dependency inversion is a good one I don't really want to have to redesign many classes within a large

project simply to use a later version of the IDE effectively.
>

Again, the preffered and simplest solution would be an option enabling users to switch off the pre-compilation dependency check.

>

Gareth

>


0


Sure, how do I go about doing this?


On Tue, 7 Sep 2004 14:42:14 +0400, Eugene Zhuravlev (JetBrains)
<jeka@intellij.com> wrote:

Could you please sumbit an SCR for optional dependency checks?

>

0

http://www.intellij.net/tracker
But you should register before with ITN (http://www.intellij.net/): just your name and email.

--
Best regards,
Eugene Zhuravlev
Software Developer
JetBrains Inc.
http://www.jetbrains.com
"Develop with pleasure!"


0

Eugene,

I've just noticed that this is the same problem that Tracker Request # 37252 is dealing with.

This has already been assigned and would appear to be a simple enhancement.

0

Please sign in to leave a comment.