pivot-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Mark R. Chambers" <m...@mrchambers.org>
Subject RE: Speeding up Apache Pivot For embedded Application
Date Fri, 28 Mar 2014 05:15:36 GMT
Hi Sandro,



All update methods are surrounded by change tests:

Basically I have status buttons on the screen that I regularly update to
show the status of equipment, so I only update them if they have changed.

And the same with label updates. so for example:

tatus)) {

TaskSetLabelText(mTRNGUIWindow.mDispenserStatusLabel[vPump], vStatus));



/** */

    private class TaskSetLabelText implements Runnable


        Label mLabel;

        String mText;

        public TaskSetLabelText(Label vLabel,String vText)


            mLabel = vLabel;

            mText = vText;



        public void run ()







Nothing too tricky, I just don't update things unless they have actually




From: Sandro Martini [mailto:sandro.martini@gmail.com] 
Sent: Friday, 28 March 2014 1:20 AM
To: Users - Apache Pivot
Subject: RE: Speeding up Apache Pivot For embedded Application


Hi Mark,
this is a good news :-) , I'm really happy for you. 

If you can,  could you post your use case for Pivot (for an embedded app) ?
Could become another user story for Pivot applications in our wiki. 

Last, what does it mean "stopped processes from updating anything in the
GUI" (in your code) ?
If you have some hint please tell, it  could be useful even to others. 

Thanks for sharing with us your real-world experience with Pivot.  


Il 27/mar/2014 18:34 "Mark R. Chambers" <mark@mrchambers.org> ha scritto:

Hi All,

I spent today working on making it more efficient, and it is substantially
faster now. Thanks for the feedback.

I am using OpenJDK on the linux platform and Oracle on the windows one;]

I increased the memory of the JAVA processes using memory command line
options (It think they are...-Xms and Xmx or something...)
I also stopped processes from updating anything in the GUI, since it seems
to force a lot of other GUI items to invalidate.

Application is much faster now, and almost the same speed as my previous
JAVA application and has a fair more complex GUI...
I will continue to work on it, I think I use far too many
FazetTableView's(about 9...), so I may need to go through that code and look
for some efficiencies I can add..

PS-Thanks for the feedback, is probably ok for now;]
-----Original Message-----
From: Sandro Martini [mailto:sandro.martini@gmail.com]
Sent: Wednesday, 26 March 2014 7:15 PM
To: Users - Apache Pivot
Subject: Re: Speeding up Apache Pivot For embedded Application

Hi Mark,

> Is there anyway to make sun.awt.GlobalCursorManager$NativeUpdater.run()
more efficient?
No (sorry), this class is bundled in rt.jar (the main jar for the JRE), so
unless you provide a patched JRE I don't think it's possible (assuming from
a legal point of view it's doable, by the license). And we don't use it
directly of course ...
Note that probably this class interacts with Threads, native (OS
specific) functions and Window Managers and other complex stuff, so anyway
it would be an hard task. Its source is not in the usual src.zip (in root of

Here an online version of that class (taken from OpenJDK-7):

Just for curiosity: did you tried with Oracle JDK or Open JDK ? Could you
try to swap ?


View raw message