gnustep-dev
[Top][All Lists]
Advanced

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

Re: A question on discardEventsMatchingMask:beforeEvent:


From: Banlu Kemiyatorn
Subject: Re: A question on discardEventsMatchingMask:beforeEvent:
Date: Sat, 29 Jan 2011 22:53:11 +0700

On Sat, Jan 29, 2011 at 9:13 PM, Fred Kiefer <address@hidden> wrote:
>
> Not using alloc/free always gives you a big benefit. The question is how
> this pays out in over all memory usage.

Any queue sure can be tuned to have limits. Actually I just found that
in my test I spent more time in messagings than mallocs. Caching IMP
improve the speed almost as significantly.

> I always wanted to use pools for a few other highly used fixed siue
> object types in GNUstep, but never got around to it. My favourite at
> that time was NSAffineTransform, but using our memory debugging facility
> (Click on the icon in the about window of an application) shows that
> even that class in rather low in the list of create temporary objects.
> (Although I had about 8 time more transforms than events creates)
> The objects that really would benefit from a pool are NSGDate,
> GSNotification and GSMutableArray. And even there this approach might be
> questionable, we first should find out, why so many of these objects get
> created and whether this is really needed. My feeling here is that the
> run loop is using objects on a too high level, where we could just work
> without them.

> As for the NSEvent class I don't see the big problem in creating and
> releasing the objects, but in having to handle all the duplicate mouse
> move events in an application. Before we even start to think about using
> an event pool we should benchmark where the actual time gets spend and
> work on that part.

I always think that NSEvents _must_ be filtered by default but it must
be done properly too.
If it isn't done properly like a broken hack, it should be turned off
by default.

-- 
    .----.     Banlu Kemiyatorn
  /.../\...\   漫画家
 |.../  \...|  http://qstx.blogspot.com (Free Software Advocacy & Development)
 |../    \..|  http://feedbat.blogspot.com (Studio Work For Hire)
  \/      \/   http://groundzerostudiocomplex.blogspot.com (Studio Research)



reply via email to

[Prev in Thread] Current Thread [Next in Thread]