[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [cp-patches] FYI: JComponent optimization
From: |
Roman Kennke |
Subject: |
Re: [cp-patches] FYI: JComponent optimization |
Date: |
Mon, 10 Oct 2005 13:39:43 +0200 |
Am Montag, den 10.10.2005, 12:54 +0200 schrieb Mark Wielaard:
> Hi Roman or David,
That was really me. I already fixed that. Was a stupid copy+paste error.
I shouldn't have started immediately with committing after the
weekend ;-)
> And while I am at it. Does this give measurable performance
> improvements?
I haven't measured yet. In my last profile run, I got >3Megs of
allocated Rectangle objects that were usually lying around on the heap,
and this seemed much too much to me, and since some methods (like
Component.getBounds()) have a counterpart that take an existing
Rectangle, I thought I would optimize one obvious hot spot, the
paintChildren method. This should really take away some load from the
allocator/garbage collector.
> Maybe you can just "inline" the SwingUtilities.calculateInnerArea()
> method in the paintChildren() code and do away with all the Rectangles
> at the same time? That would take away the worry that the Rectangle
> might get modified in another context within the same method call chain.
Yeah, that would be a nice optimization over my optimization. Will take
a look at it soon.
Cheers,
Roman
signature.asc
Description: Dies ist ein digital signierter Nachrichtenteil