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.
Considering the slowdown the code seems to be having you could
possibly track it down without getting into profiling. Although
profiling might be a useful skill to acquire in dealing with this
sort of situation.
But it could probably be found reasonably quickly just with
currentTimeMillis() and println's by playing the hi-lo game.
Say you have
long initTime = System.currentTimeMillis();
long now = 0, elapsed = 0;
and code like...
System.out.println("Before method a");
methoda();
now = System.currentTimeMIllis();
elapsed = now - initTime;
initTime = now;
System.out.println("methoda took " + elapsed + " ms");
System.out.println("Before method b");
methodb();
now = System.currentTimeMIllis();
elapsed = now - initTime;
initTime = now;
System.out.println("methodb took " + elapsed + " ms");
If you see that methodb is taking 30x as long as methoda then you
further narrow it down to something less broad to determine where it
is doing that.
_______________________________________________
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