Mailing Lists: Apple Mailing Lists

Image of Mac OS face in stamp
 
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Can't serialize object



Lou Cohen wrote:

>My thought was that serialization seemed to be quite easy to implement, so
>why not at least find out if it provided any performance improvement? I
>thought it might be easier to write the serialization code than to devise a
>series of tests to isolate the performance problem.

Profiling your code simply measures it.  You don't devise or write a series
of tests.  You just run the code you have, as-is, with profiling enabled,
and look at the measurements it dumps out.

The -Xprof option, in particular, is especially easy, because it prints out
the elapsed times sorted by percent consumed by method, per thread.  There
is literally nothing else you do: just run the program and read the output
on the console.  The ones with high percentages are your most likely
culprits.


>Another contributor suggested that the Aqua UI is in general not
>serializable, but that Metal is. It was very easy for me to switch my
>application to Metal and to serialize the object that was causing me trouble
>-- just a few lines of code for each step.

So now that you can make it fast or make it slow, you can profile both
versions and see the differences.  Methods with high percentages in the
slow version should have little or no appearance in the fast version.
Likewise in the other direction.  It should be quite easy to find the root
cause of the slowdown.  And it might tell you useful things about the rest
of your program's performance.

  -- GG


 _______________________________________________
Do not post admin requests to the list. They will be ignored.
Java-dev mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/java-dev/email@hidden

This email sent to email@hidden



Visit the Apple Store online or at retail locations.
1-800-MY-APPLE

Contact Apple | Terms of Use | Privacy Policy

Copyright © 2007 Apple Inc. All rights reserved.