Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > Java > speeding up javac

Reply
Thread Tools

speeding up javac

 
 
Aryeh M. Friedman
Guest
Posts: n/a
 
      01-02-2009
I have a very large project that would take to long to recompile stuff
that does not need to be recompiled. For various reasons using ANT
is not possible (doesn't play well enough with other languages). I
looked into Jikes but that is no good because our code is 1.5+. I
tried javac with -g:none and -server and had no improvement at all.
Is there any other way to speed stuff up and still compile things one
class at a time?
 
Reply With Quote
 
 
 
 
JC
Guest
Posts: n/a
 
      01-02-2009
On Jan 2, 1:05*am, "Aryeh M. Friedman" <(E-Mail Removed)>
wrote:
> I have a very large project that would take to long to recompile stuff
> that does not need to be recompiled. * For various reasons using ANT
> is not possible (doesn't play well enough with other languages). *I
> looked into Jikes but that is no good because our code is 1.5+. * I
> tried javac with -g:none and -server and had no improvement at all.
> Is there any other way to speed stuff up and still compile things one
> class at a time?


Maybe use Make? Or compile only the Java parts with ANT, but use
something else for the rest of the code that ANT is causing you
problems with?

HTH,
Jason
 
Reply With Quote
 
 
 
 
Aryeh M. Friedman
Guest
Posts: n/a
 
      01-02-2009
On Jan 2, 1:36*am, JC <(E-Mail Removed)> wrote:
> On Jan 2, 1:05*am, "Aryeh M. Friedman" <(E-Mail Removed)>
> wrote:
>
> > I have a very large project that would take to long to recompile stuff
> > that does not need to be recompiled. * For various reasons using ANT
> > is not possible (doesn't play well enough with other languages). *I
> > looked into Jikes but that is no good because our code is 1.5+. * I
> > tried javac with -g:none and -server and had no improvement at all.
> > Is there any other way to speed stuff up and still compile things one
> > class at a time?

>
> Maybe use Make? Or compile only the Java parts with ANT, but use
> something else for the rest of the code that ANT is causing you
> problems with?
>
> HTH,
> Jason


I use cook which is much smarter then make and subtasking to an other
build program would ruin many of the best features of cook such as
full project scanning.
 
Reply With Quote
 
Mike Schilling
Guest
Posts: n/a
 
      01-02-2009
Aryeh M. Friedman wrote:
> I have a very large project that would take to long to recompile
> stuff
> that does not need to be recompiled. For various reasons using ANT
> is not possible (doesn't play well enough with other languages). I
> looked into Jikes but that is no good because our code is 1.5+. I
> tried javac with -g:none and -server and had no improvement at all.
> Is there any other way to speed stuff up and still compile things
> one
> class at a time?


If ANT's minimal dependency management is sufficient for your project,
it wouldn't be difficult to write a Java program that reproduces it
and could be called from any make-like build system. In fact, you'd
only have to slightly modify the code that ANT's javac task uses.


 
Reply With Quote
 
Aryeh M. Friedman
Guest
Posts: n/a
 
      01-02-2009
On Jan 2, 2:01*am, "Mike Schilling" <(E-Mail Removed)>
wrote:
> Aryeh M. Friedman wrote:
> > I have a very large project that would take to long to recompile
> > stuff
> > that does not need to be recompiled. * For various reasons using ANT
> > is not possible (doesn't play well enough with other languages). *I
> > looked into Jikes but that is no good because our code is 1.5+. * I
> > tried javac with -g:none and -server and had no improvement at all.
> > Is there any other way to speed stuff up and still compile things
> > one
> > class at a time?

>
> If ANT's minimal dependency management is sufficient for your project,
> it wouldn't be difficult to write a Java program that reproduces it
> and could be called from any make-like build system. *In fact, you'd
> only have to slightly modify the code that ANT's javac task uses.


I already did this to some extent when it selects what to compile (I
wrote a little program to scan imports to make this decision)... yes I
know it is a little dumb since it needs an explicit import for
everything with no wild cards.
 
Reply With Quote
 
Andrew Thompson
Guest
Posts: n/a
 
      01-02-2009
On Jan 2, 5:05*pm, "Aryeh M. Friedman" <(E-Mail Removed)>
wrote:
> I have a very large project that would take to long ...


Idea. Get a faster box or be more patient.

--
Andrew Thompson
http://pscode.org/
 
Reply With Quote
 
Aryeh M. Friedman
Guest
Posts: n/a
 
      01-02-2009
On Jan 2, 5:33*am, Andrew Thompson <(E-Mail Removed)> wrote:
> On Jan 2, 5:05*pm, "Aryeh M. Friedman" <(E-Mail Removed)>
> wrote:
>
> > I have a very large project that would take to long ...

>
> Idea. *Get a faster box or be more patient.
>
> --
> Andrew Thompsonhttp://pscode.org/


Not to bragging but quad core running at 2.58 GHz and 4 GB of RAM with
a sata 300 drive should be enough... and as far as patience goes I
think 5 mins to recompile for a 1 one line change is insane
(exspecially when we do this on a quite regular basis [say 20 times an
hour])
 
Reply With Quote
 
Aryeh M. Friedman
Guest
Posts: n/a
 
      01-02-2009
On Jan 2, 5:42*am, "Aryeh M. Friedman" <(E-Mail Removed)>
wrote:
> On Jan 2, 5:33*am, Andrew Thompson <(E-Mail Removed)> wrote:
>
> > On Jan 2, 5:05*pm, "Aryeh M. Friedman" <(E-Mail Removed)>
> > wrote:

>
> > > I have a very large project that would take to long ...

>
> > Idea. *Get a faster box or be more patient.

>
> > --
> > Andrew Thompsonhttp://pscode.org/

>
> Not to bragging but quad core running at 2.58 GHz and 4 GB of RAM with
> a sata 300 drive should be enough... and as far as patience goes I
> think 5 mins to recompile for a 1 one line change is insane
> (exspecially when we do this on a quite regular basis [say 20 times an
> hour])


Forgot to mention without the import scanner I mentioned it is 45 mins
(that is with javac `find . -name '*.java'` not compiling one at a
time I never bothered to time that but it would likely be well over 2
hrs
 
Reply With Quote
 
Andrew Thompson
Guest
Posts: n/a
 
      01-02-2009
On Jan 2, 9:42*pm, "Aryeh M. Friedman" <(E-Mail Removed)>
wrote:
> On Jan 2, 5:33*am, Andrew Thompson <(E-Mail Removed)> wrote:
>
> > On Jan 2, 5:05*pm, "Aryeh M. Friedman" <(E-Mail Removed)>
> > wrote:

>
> > > I have a very large project that would take to long ...

>
> > Idea. *Get a faster box or be more patient.

>
> > --
> > Andrew Thompsonhttp://pscode.org/

>
> Not to bragging ..


While you are 'not bragging' please don't forget
to trim sigs. from replies. Not all of us have
broadband-on-demand. TIA.

--
Andrew Thompson
http://pscode.org/
 
Reply With Quote
 
RedGrittyBrick
Guest
Posts: n/a
 
      01-02-2009

Aryeh M. Friedman wrote:
> On Jan 2, 5:33 am, Andrew Thompson <(E-Mail Removed)> wrote:
>> On Jan 2, 5:05 pm, "Aryeh M. Friedman" <(E-Mail Removed)>
>> wrote:
>>
>>> I have a very large project that would take to long ...

>> Idea. Get a faster box or be more patient.
>>
>> --
>> Andrew Thompsonhttp://pscode.org/

>
> Not to bragging but quad core running at 2.58 GHz and 4 GB of RAM with
> a sata 300 drive should be enough... and as far as patience goes I
> think 5 mins to recompile for a 1 one line change is insane
> (exspecially when we do this on a quite regular basis [say 20 times an
> hour])


That does indeed sound insane. How can javac's speed be an issue? Do you
have a single .java file containing a titanic amount of code? Are you
asking javac to compile .java files that don't need compiling? (if so why?)

Either you are doing something rather unusual or my knowledge of Java is
incomplete in some interesting way - please enlighten me.

--
RGB
 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
[ot]Valid excuse for speeding? JaR MCSE 9 01-05-2005 08:23 PM
speeding up data transfer? Devin Panchal Wireless Networking 1 09-06-2004 05:46 PM
Need some hints on speeding up Spamtrap Perl 1 08-11-2004 11:25 PM
Speeding up pages OHM ASP .Net 2 05-24-2004 03:24 PM
Speeding up page display Troy ASP .Net 2 01-22-2004 09:13 PM



Advertisments