On Sat, Jan 29, 2011 at 9:13 PM, Fred Kiefer <[email protected]> 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) _______________________________________________ Gnustep-dev mailing list [email protected] http://lists.gnu.org/mailman/listinfo/gnustep-dev
