Patch: Speed up NetBeans IDE execution

Jaroslav Tulach jaroslav.tulach at gmail.com
Thu Mar 12 04:42:34 UTC 2015


2015-03-11 20:51 GMT+01:00 Doug Simon <doug.simon at oracle.com>:

> Your suggestion sounds good. I’ll have to defer to you as to how we
> generate project configurations to offer those different menu options.


I checked with Tomáš and currently there is no way to influence pop-up menu
of this type of project from its configuration files. Tomáš can fix that
for NetBeans 8.1 - or at least make "Build with Dependencies" action
available as is common in Maven projects...

Meanwhile I can only hack with various Clean/Build tricks. My favourite one
is:

1. Build/Clean action operates only locally as well as other actions, like
Run, Test.
2. Clean action marks the project to be eligible for complete rebuild so
subsequent action (like Build) builds with all dependencies.

A bit magical, but it optimizes for the main usecase - e.g. fast work with
single project. Unless there are objections, I can prepare the patch.
-jt

I have experience with Eclipse (where saving a file is the only explicit
> build step I need*).
>
* in theory - unfortunately Eclipse has its own issues which is only
> resolved by refreshing a few times.
>

PS: NetBeans has such mode as well, but I usually turn it of because its
occasional quirks.


> > On Mar 11, 2015, at 7:08 PM, Jaroslav Tulach <jaroslav.tulach at gmail.com>
> wrote:
> >
> > It might be better to leave the choice in hands on the person that does
> the build. E.g. have two menu items in project pop-up menu to "Build" and
> "Build with Dependencies" (I am trying to find out if that is possible). Or
> do something different on "Build" vs. "Clean and Build" (I know how to do
> it). Or leave "Clean and Build" action fast. But "Clean" followed by
> "Build" do the complete build with dependencies (I know how to do it as
> well).
> >
> > Choosing the dependency-build style when invoking mx.sh seems to global
> and too early too me.
> > -jt
> >
> >
> > 2015-03-11 12:53 GMT+01:00 Doug Simon <doug.simon at oracle.com>:
> > Hi Jaroslav,
> >
> > > On Mar 11, 2015, at 11:52 AM, Jaroslav Tulach <
> jaroslav.tulach at gmail.com> wrote:
> > >
> > > Hi.
> > > I am using Graal with NetBeans and found various operations (rebuild
> of a
> > > single module, execution) too slow. I believe the reason is that
> NetBeans try
> > > to ensure all dependant projects are up-to-date. I guess this is
> unnecessary.
> >
> > Ideally, an IDE should ensure all dependents are up to date when the
> project they depend on changes. Unfortunately, this is a little slow in
> Netbeans since it out-souces the updating to ant which isn’t very
> incremental.
> >
> > > The usual workflow is to do:
> > >
> > > $ ./mx build
> > >
> > > and only then rebuild individual parts in the IDE, right?
> >
> > With your patch, this will become the *required* workflow for NetBeans
> users. The ‘mx build’ step will probably take as long NetBeans doing the
> updating itself but at least it is an explicit step as opposed to occurring
> each time one edits a file in NetBeans. In Eclipse, this is all somewhat
> faster given that it does more precise propagation of updates.
> >
> > I propose making this setting conditional on a variable in mx/env.
> Something like:
> >
> > NETBEANS_UPDATE_DEPENDENTS=false
> >
> > How does that sound? Of course, the variable would only have an effect
> when running ‘mx netbeansinit’.
> >
> > -Doug
> >
>
>


More information about the graal-dev mailing list