Arnit,

Some of these comments may be lame or real obvious.  I've been at this (Java
Development) 
a while (since 1996), but still have much to learn.

-- Read O'Reilly's book Java Performance Tuning by Jack Shirazi  (Pg. 18-19
has a good check list)
        This will help you get the mindset and attitude to shift focus from
"construction worker" to "quality assurance".   

-- Attend some of the performance sessions at JavaOne March 22-29
        The points people make during talks will wind up in next year's
books.  The new products (JVM etc) all have their improvements.  This might
affect how you optimize.

-- Use a profiler.  Every project is different. Where the location of the
bottle neck will suprise you. (Especially, 
        if you learn from your mistakes).
        I personally like JProbe the best (use the built in java -Xrunhprof
until a purchase is made)
        80% of the bottle neck will be in 20% of the code
        Algorithm improvements will give you the best performance
improvements.

-- Avoid creating Objects, even if it is better OOD
        Just like placing a Database design in 3rd normal form, then
implementing 
        a not so "perfect" design that queries faster.  
        Do your object design and then deconstruct some of the objects in
favor of performance.  
        For example, you temporarily need a collection of (X,Y) graph points
and you 
        create a Vector of Points (where Points is a class with int x and
int y).
        Try using int x[20];    int y[20] instead.   If this was in you most
used routine, 
        major improvement -- and the code is still easy to read and
maintain.
        Same goes for String concatenation.  That's why StringBuffer was
added.

Perceived Performance
Use a simple splash screen during initial startup,  build the rest of the
application in a background thread.
Stop optimizing when the improvements are less than 20% -- it is no longer
noticeable to the user
The wall clock time is your best and only real measure
System.getcurrentTimeMillis()


Hope this helps,
Martin

> -----Original Message-----
> From: Amit Rana [SMTP:[EMAIL PROTECTED]]
> Sent: Monday, February 11, 2002 11:34 PM
> To:   [EMAIL PROTECTED]
> Subject:      Design guidelines
> Importance:   High
> 
> Hi,
>  
>     1.    Can anyone give some guidelines or points to remember while
> designing/scheduling a Swing project.
>     2.    Points to remember to get better performance and better memory
> utilization?
>  
> Regards,
> Amit.
_______________________________________________
Advanced-swing mailing list
[EMAIL PROTECTED]
http://eos.dk/mailman/listinfo/advanced-swing

Reply via email to