[
https://issues.apache.org/jira/browse/PIVOT-122?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12711114#action_12711114
]
Noel Grandin commented on PIVOT-122:
------------------------------------
It may well be that you can find some stuff that can be speeded up, but outside
of obvious problem, you've only got a couple of options
(a) something like Proguard, which strips away unnecessary stuff and optimises
what is left
(b) triggering the class-loading as early as possible - I do this in one of my
apps :
public static void main(String [] args) {
// start loading these classes early because they take a long time
new Thread() {
public void run() {
new ClassThatNeedsALongTimeToLoad();
}
}.start();
.... everything else...
}
> Optimize WTK class loading
> --------------------------
>
> Key: PIVOT-122
> URL: https://issues.apache.org/jira/browse/PIVOT-122
> Project: Pivot
> Issue Type: Improvement
> Components: wtk
> Reporter: Todd Volkert
> Assignee: Greg Brown
> Fix For: 1.3
>
>
> Class initialization for pivot.wtk.<Class> often takes upwards of 300-500ms
> (sometimes more). This is because initializing one class in that package
> often triggers initialization of many other classes, which is to be expected.
> Nonetheless, 500ms seems extreme for class loading.
> This problem can be seen by creating a simple skeleton app that simply loads
> a WTKX hierarchy and adds it to the display. Using WTKX binding, you'll see
> that the first call to bind() will take a long time (the aforementioned
> 500ms), then an immediately subsequent call to bind() will take drastically
> less, even though it's still instantiating the objects anew. The difference
> is that the first call to bind has to run WTK class initialization.
> This may be something we just live with, but it should at least be
> investigated to see if we can't find a smoking gun. The premise is that
> compiled byte code running on an nGHz processor shouldn't take half a second
> to run class initialization. Informal tests show this time to be the last
> vestige of slow load times for Pivot apps.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.