pivot-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Sandro Martini <sandro.mart...@gmail.com>
Subject Re: Speeding up Apache Pivot For embedded Application
Date Fri, 28 Mar 2014 17:06:57 GMT
Hi Mark,
good to know :-) ...

Thanks again for the info.

Bye,
Sandro


2014-03-28 6:15 GMT+01:00 Mark R. Chambers <mark@mrchambers.org>:
> 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:
>
> if(!mTRNGUIWindow.mDispenserStatusLabel[vPump].getText().equalsIgnoreCase(vStatus))
> {
>
>             ApplicationContext.queueCallback(new
> 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 ()
>
>         {
>
>             mLabel.setText(mText);
>
>             mLabel.setTextKey(mText);
>
>         }
>
>     }
>
>
>
> Nothing too tricky, I just don't update things unless they have actually
> changed;]
>
> Regards,
>
> Mark.
>
>
>
> 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.
>
> Bye,
> Sandro
>
> Il 27/mar/2014 18:34 "Mark R. Chambers" <mark@mrchambers.org> ha scritto:
>
> Hi All,
>
> SUMMARY:
> I spent today working on making it more efficient, and it is substantially
> faster now. Thanks for the feedback.
>
> DETAILS:
> 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;]
> Regards,
> Mark.
> -----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
> JDK).
>
> Here an online version of that class (taken from OpenJDK-7):
> http://www.docjar.com/html/api/sun/awt/GlobalCursorManager.java.html
>
>
> Just for curiosity: did you tried with Oracle JDK or Open JDK ? Could you
> try to swap ?
>
>
> Bye,
> Sandro

Mime
View raw message