Slow Rendering

1 view
Skip to first unread message

Gregg Bolinger

unread,
Aug 28, 2008, 9:46:04 PM8/28/08
to javabu...@googlegroups.com
I'm having performance issues.  I did the following:

long start = System.currentTimeMillis();
BuildResult result = build(this);
long end = System.currentTimeMillis();

Granted this isn't the best benchmarking that could be done but for quick glance it works.  It takes 454 ms (give or take) to process the yaml file.  It is a noticeable delay in our app.  Is there anything that can be done to speed it up?

--
Gregg Bolinger

Jacek Furmankiewicz

unread,
Aug 29, 2008, 5:27:14 AM8/29/08
to JavaBuilders
That's a lot. Send me the file and I will start looking at where the
bottlenecks are

Jacek Furmankiewicz

unread,
Aug 29, 2008, 7:14:33 AM8/29/08
to JavaBuilders
I tried it on the entire Samples app (which is quite large and
complex) and it takes from 1.5 - 2.5 seconds for all the multiple
tabs. I'll use that as my test benchmark to see if I can get that
down.

Jacek Furmankiewicz

unread,
Aug 29, 2008, 8:10:06 AM8/29/08
to JavaBuilders
I did some very preliminary testing to see if it's in the YAML parsing
code or in the actual Builder code and most of the time is in the
builder code, definitely. I will need to do some major profiling to
figure out why, as you can imagine the code is quite complex and
relies massively on reflection everywhere.

Jacek Furmankiewicz

unread,
Aug 29, 2008, 8:13:35 AM8/29/08
to JavaBuilders
Forgot to mention: I also did some tests on JRE 5 vs 6 and there is a
big difference of approx. 30%. So JDK 6 is preferable by far, but I am
guessing you are already on JDK 6 anyway.

Jacek Furmankiewicz

unread,
Aug 29, 2008, 9:54:04 AM8/29/08
to JavaBuilders
So far my profiling tests indicate 2/3 of the time being spent in
MigLayout...I sent off an email to Mikael Grev to see if he could
recommend something.

I also updated to the latest version (MigLayout 3.5.6) and it made a
minor improvement (approx. 5%) but not enough to make a big dent.

Jacek Furmankiewicz

unread,
Aug 31, 2008, 9:48:57 AM8/31/08
to JavaBuilders
Mikael told me there ws no way MigLayout could be the cause, since the
layout is very fast (1 ms or so). What he was concerned about is the
actual amount of calls to the layout engine...I can't really see that
coming from the builder, since it just adds the components..so maybe
there is something else going on here.

Will be looking at it as my top priority for 0.3

Jacek Furmankiewicz

unread,
Sep 2, 2008, 4:07:29 PM9/2/08
to JavaBuilders
Seems the Nimbus L&F is the culprit...so use it with caution at this
point, it seems to be quite unoptimized at this point in time...
Reply all
Reply to author
Forward
0 new messages