Re: performance issues on win32



On Sun, Mar 31, 2002 at 02:50:29AM +1000, Cameron Davidson csiro au wrote:
> Most of the speed problem seems to tie in with a poor match between
> the X11-GC basis for GDK and the MS_Windows DC.  A lot of the time
> seems to be spent creating and deleting pens and brushes and/or
> other objects.

> It might be possible to get some speed improvement by delaying
> object deletion until a different one is required, but this would be
> at the expense of added code complexity, and I suspect it might even
> be counterproductive in some cases.

If the CreatePen()/etc. functions are implemented with a very thin wrapper,
an LRU-type cache or similar should suffice quite acceptably. This is not
completely unlike "Memory Chunks" avoiding calls to malloc().

mark

-- 
mark mielke cc/markm ncf ca/markm nortelnetworks com __________________________
.  .  _  ._  . .   .__    .  . ._. .__ .   . . .__  | Neighbourhood Coder
|\/| |_| |_| |/    |_     |\/|  |  |_  |   |/  |_   | 
|  | | | | \ | \   |__ .  |  | .|. |__ |__ | \ |__  | Ottawa, Ontario, Canada

  One ring to rule them all, one ring to find them, one ring to bring them all
                       and in the darkness bind them...

                           http://mark.mielke.cc/




[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]