Skip to main content



      Home
Home » Language IDEs » Java Development Tools (JDT) » Compiles too many files when add one method(Incremental compilation can it be more efficient?)
Compiles too many files when add one method [message #515177] Wed, 17 February 2010 20:01 Go to next message
Eclipse UserFriend
We have a java class foo that has over 23000 references to it in our workspace. If I add a new method to it such as:


public void foobar() {

}

Then eclipse 3.5 Build id: 20090920-1017 shows in the Progress View that it is compiling what looks like every package in our workspace that references it.

I thought Eclipse had an incremental compiler in it? Since this is a new method not being used anywhere surely Eclipse should be smart enough to know that I only need to compile foo.java into foo.class and leave it at that? So an operation taking several minutes to complete should only take several seconds to complete?

Regards,
Stephen

[Updated on: Wed, 17 February 2010 21:56] by Moderator

Re: Compiles too many files when add one method [message #515249 is a reply to message #515177] Thu, 18 February 2010 04:40 Go to previous messageGo to next message
Eclipse UserFriend
Stephen Kurlow wrote:
> We have a java class foo that has over 23000 references to it in our
> workspace. If I add a new method to it such as:
>
>
> public void foobar() {
>
> }
>
> Then eclipse 3.5 Build id: 20090920-1017 shows in the Progress View
> that it is compiling what looks like every package in our workspace
> that references it.
First, it depends how the class is referenced: if e.g. your class
extends some other classes then it needs to check whether foobar() is
already defined in one of them. Second, there might be other builders in
your workspace that are not capable of incremental building and hence it
takes so long. If both is not true then I suggest you file a bug report
against JDT Core.

Dani
>
> I thought Eclipse had an incremental compiler in it? Since this is a
> new method not being used anywhere surely Eclipse should be smart
> enough to know that I only need to compile foo.java into foo.class and
> leave it at that? So an operation taking several minutes to complete
> should only take several seconds to complete?
>
> Regards,
> Stephen
Re: Compiles too many files when add one method [message #515878 is a reply to message #515249] Sun, 21 February 2010 19:15 Go to previous messageGo to next message
Eclipse UserFriend
I have since found out that only one java class was changed but it seems that the incremental compiler takes an incredible amount of effort and time to determine that all the referencing classes do not need to be recompiled. What is involved in getting started to build and performance test and analyse the jdt? I have jprofiler but I need instructions on how to build the jdt src code and create a junit performance test so I can analyse the test's execution with jprofiler?
Re: Compiles too many files when add one method [message #515895 is a reply to message #515878] Mon, 22 February 2010 02:16 Go to previous messageGo to next message
Eclipse UserFriend
Stephen Kurlow wrote:
> I have since found out that only one java class was changed but it
> seems that the incremental compiler takes an incredible amount of
> effort and time to determine that all the referencing classes do not
> need to be recompiled. What is involved in getting started to build
> and performance test and analyse the jdt? I have jprofiler but I need
> instructions on how to build the jdt src code
Why? You can also profile the binaries to find out what takes long. Also
see the debug options that you can enable to see what's being built.

Dani
> and create a junit performance test so I can analyse the test's
> execution with jprofiler?
Re: Compiles too many files when add one method [message #515947 is a reply to message #515895] Mon, 22 February 2010 05:24 Go to previous message
Eclipse UserFriend
Hi Dani,

Yes true I can use JProfiler to profile a local JVM session but if I decide to experiment with changing the JDT source code then I will eventually need to be able to junit test the JDT to see the effect of my changes both in terms of impact on functionally and performance.

Thanks,
Stephen
Previous Topic:Java debugging - cannot be resolved
Next Topic:Java Build Path
Goto Forum:
  


Current Time: Wed Mar 19 23:10:05 EDT 2025

Powered by FUDForum. Page generated in 0.30098 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top