speeding up javac

  • Thread starter Aryeh M. Friedman
  • Start date
M

Martin Gregorie

Great! What do you suggest for someone posting from an internet cafe,
or the local library, who does not have the right nor ability to install
a news client, nor hunt around for free providers of usenet archives?
Some web browsers, e.g. Opera, though not Firefox, can deal directly
with USENET.
 
T

Tom Anderson

On Jan 3, 11:16 pm, "Peter Duniho" <[email protected]>
wrote:
...

Great! What do you suggest for someone posting from an internet cafe,
or the local library, who does not have the right nor ability to install
a news client, nor hunt around for free providers of usenet archives?

A free shell provider and a command-line news client. If you don't have an
ssh client on your library machine, some provide an applet that does ssh.
You can run applets, right?

SDF would be one that does everything you need:

http://sdf.lonestar.org/
(Some of you people have it too lucky - force you to use someone else's
computer through a low bandwidth modem and I reckon it would wipe that
silly grin off your face.)

A gentlemen, sir, has a login account on a globally accessible machine,
and knows how to use it.

tom
 
A

Arne Vajhøj

Lew said:
I've been on Java projects that large. Having such a project all in
one compile is a mistake; don't blame the compiler.

Knute is right - break the project up into libraries and your problem
will go away. That's what the projects did where I worked. I can
rebuild code in a minute or so on a much weaker workstation than the
OP described.

I completely agree with that.

The files should be split up in subprojects.

And if that is too difficult then it is an indication
that the code is not structured well.

Arne
 
T

Tom Anderson

Does gentlemen use computers ?

Ordinarily not, but a gentlemen finds employing a valet to do these things
troublesome in these difficult economic times.

tom
 
M

Mike Schilling

Tom said:
Ordinarily not, but a gentlemen finds employing a valet to do these
things troublesome in these difficult economic times.

"Your e-mail in on the sideboard, sir."
 
R

Roedy Green

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)

You can create ant tasks for any program, including compilers for
other languages. ANT speeds things up enormously mainly because it
loads the compiler once, not once per source file.
see http://mindprod.com/jgloss/ant.html


Back in the olden days before there was ant, we used to compile
quickly using a Java program that invoked the unofficial compiler
interface. Now there is an official interface. So you could create
your own special purpose ant-like tool, though I think adding
facilities to ant is the easier way to go. See
http://mindprod.com/jgloss/onthefly.html
--
Roedy Green Canadian Mind Products
http://mindprod.com
PM Steven Harper is fixated on the costs of implementing Kyoto, estimated as high as 1% of GDP.
However, he refuses to consider the costs of not implementing Kyoto which the
famous economist Nicholas Stern estimated at 5 to 20% of GDP
 
R

Roedy Green

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])

If you have a team, you might consider setting up a dedicated compile
server rather than having every member of the team get the latest
changes and recompile.
--
Roedy Green Canadian Mind Products
http://mindprod.com
PM Steven Harper is fixated on the costs of implementing Kyoto, estimated as high as 1% of GDP.
However, he refuses to consider the costs of not implementing Kyoto which the
famous economist Nicholas Stern estimated at 5 to 20% of GDP
 
R

Roedy Green

Please use the proper sig block separator: "-- ", i.e. dash dash space
(followed by a new line).

Given that so many editors and other software trim trailing blanks,
and you can proof read a trailing blank, that was not a very bright
choice. It is a standard guaranteed to be ignored.
--
Roedy Green Canadian Mind Products
http://mindprod.com
PM Steven Harper is fixated on the costs of implementing Kyoto, estimated as high as 1% of GDP.
However, he refuses to consider the costs of not implementing Kyoto which the
famous economist Nicholas Stern estimated at 5 to 20% of GDP
 
J

Joshua Cranmer

Roedy said:
Given that so many editors and other software trim trailing blanks,
and you can proof read a trailing blank, that was not a very bright
choice. It is a standard guaranteed to be ignored.

The reason for the trailing blank, I believe, was to make it harder to
accidentally type in.
 
M

Martin Gregorie

You can use make.

I tried that and it worked - for a while. Make doesn't play nicely with
Java, not least because javac will compile supporting classes
automatically, so I ended up moving all my Java projects the ant.

However, there's no reason why a mixed language project shouldn't use
make as the main project building tool but have it run ant for Java
compilation, javadocs and jar file creation.

Additional thought: ant may be better than make of your project is
structured as a deep directory hierarchy because the one ant script can
deal with the nesting, unlike make, which it typically calls itself
recursively for each directory containing source files.
 
T

Tom Anderson

Given that so many editors and other software trim trailing blanks, and
you can proof read a trailing blank, that was not a very bright choice.
It is a standard guaranteed to be ignored.

Agreed. I'd love to know the history of the sigdashes - the trailing space
seems like an incredibly bizarre requirement.

tom
 
L

lbarowski

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

That seems odd. My system is somewhat slower than yours,
and a ~ 250 KLOC 1000 file project compiles in about 7
seconds under javac from Java 1.6. The full build just
cleans the .class files and compiles the few roots on
which everything depends (the main entry class and the
entry classes for some plugins). Just how big is your
project?
 
M

Mike Schilling

Tom said:
Agreed. I'd love to know the history of the sigdashes - the trailing
space seems like an incredibly bizarre requirement.

It has the advantage of being unlikely to appear by accident.
 
L

Lew

Mike said:
It has the advantage of being unlikely to appear by accident.

As Joshua Cranmer mentioned:
The reason for the trailing blank, I believe,
was to make it harder to accidentally type in.

And it's been an RFC for quite some time.
 
T

Tom Anderson

As Joshua Cranmer mentioned:

I can believe that's the reason, but it's a really poor reason. There are
any number of character sequences of which this is true, and very many of
them are more robust than dash-dash-space. How about dash-dash-colon? Or
dash-space-dash? Trailing spaces are the kind of thing which get added and
removed at random, and so make a very poor feature of a string which you
want to (a) be faithfully carried through the mail and news systems and
(b) not appear spontaneously.

Isn't there a language which uses a double dash as a one-line comment
delimiter? Some dialect of SQL?
And it's been an RFC for quite some time.

I'm not denying it. I want to know how it got that way!

tom
 
M

Mike Schilling

Tom said:
I can believe that's the reason, but it's a really poor reason.
There
are any number of character sequences of which this is true, and
very
many of them are more robust than dash-dash-space. How about
dash-dash-colon? Or dash-space-dash? Trailing spaces are the kind of
thing which get added and removed at random, and so make a very poor
feature of a string which you want to (a) be faithfully carried
through the mail and news systems and (b) not appear spontaneously.

There was a language I once had to code in (I think it was VAX-11
BASIC) where the signla that a line would be continued was that it had
"&" as its last character. Unfortuinately, not last *visible*
character, because if a space followed the "&", a syntax violation
resulted (probably more than one, actually), thus code that looked
perfectly correct wouldn't compile. Annoying as hell.
 
L

Lew

Tom said:
I'm not denying it. I want to know how it got that way!

I agree that understanding the reasoning is an interesting academic
exercise, but that at this late date the standard's cast in stone and
past changing without considerable social effort.

Undoubtedly other patterns would have had their detractors as well. I
don't even disagree that the current standard might be flawed. It's
just that we're stuck with it, absent the aforementioned considerable
social effort.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,774
Messages
2,569,599
Members
45,175
Latest member
Vinay Kumar_ Nevatia
Top