Re: Key-Value Observing speed

2010-03-13 Thread Paul Sanders
> As people often seem to do with such things, I was > misinterpreting what it [Instruments] was telling me. A really really simple way of getting a handle on where a program is spending its time is to take a few samples in Activity Monitor while it is busy. You'd be amazed at how well this w

Re: Key-Value Observing speed

2010-03-12 Thread Don Quixote de la Mancha
On Fri, Mar 12, 2010 at 2:41 PM, Gwynne Raskind wrote: > (It's even more annoying because it *was* an NSPoint in a much earlier > iteration of the code and I changed it because it simplified the code in two > dozen places, and because the property in question is integer and doesn't > need the s

Re: Key-Value Observing speed

2010-03-12 Thread Gwynne Raskind
On Mar 12, 2010, at 10:22 PM, Michael Ash wrote: >> You're right; the specific call that's causing the worst speed issues is >> returning a property typed with this structure: >> >> typedef struct { int32_t x, y; } IntegerPoint; >> >> It's not necessarily feasible to switch this to an NSPoint; i

Re: Key-Value Observing speed

2010-03-12 Thread Michael Ash
On Fri, Mar 12, 2010 at 5:41 PM, Gwynne Raskind wrote: > On Mar 12, 2010, at 4:52 PM, Peter Ammon wrote: >>> While profiling a project I'm working on, I found that while most of my >>> time was being spent in glFlush() (which is completely expected for an >>> OpenGL-based game), a non-trivial am

Re: Key-Value Observing speed

2010-03-12 Thread Mike Abdullah
On 12 Mar 2010, at 23:32, Gwynne Raskind wrote: > On Mar 12, 2010, at 5:49 PM, Greg Parker wrote: >>> You're right; the specific call that's causing the worst speed issues is >>> returning a property typed with this structure: >>> >>> typedef struct { int32_t x, y; } IntegerPoint; >>> >>> It's

Re: Key-Value Observing speed

2010-03-12 Thread Quincey Morris
On Mar 12, 2010, at 14:41, Gwynne Raskind wrote: > You're right; the specific call that's causing the worst speed issues is > returning a property typed with this structure: > > typedef struct { int32_t x, y; } IntegerPoint; > > It's not necessarily feasible to switch this to an NSPoint; it mea

Re: Key-Value Observing speed

2010-03-12 Thread Gwynne Raskind
On Mar 12, 2010, at 5:49 PM, Greg Parker wrote: >> You're right; the specific call that's causing the worst speed issues is >> returning a property typed with this structure: >> >> typedef struct { int32_t x, y; } IntegerPoint; >> >> It's not necessarily feasible to switch this to an NSPoint; it

Re: Key-Value Observing speed

2010-03-12 Thread Mike Abdullah
On 12 Mar 2010, at 22:41, Gwynne Raskind wrote: > On Mar 12, 2010, at 4:52 PM, Peter Ammon wrote: >>> While profiling a project I'm working on, I found that while most of my >>> time was being spent in glFlush() (which is completely expected for an >>> OpenGL-based game), a non-trivial amount o

Re: Key-Value Observing speed

2010-03-12 Thread Eli Bach
On Mar 12, 2010, at 3:41 PM, Gwynne Raskind wrote: > You're right; the specific call that's causing the worst speed issues is > returning a property typed with this structure: > > typedef struct { int32_t x, y; } IntegerPoint; > > It's not necessarily feasible to switch this to an NSPoint; it

Re: Key-Value Observing speed

2010-03-12 Thread Greg Parker
On Mar 12, 2010, at 2:41 PM, Gwynne Raskind wrote: > You're right; the specific call that's causing the worst speed issues is > returning a property typed with this structure: > > typedef struct { int32_t x, y; } IntegerPoint; > > It's not necessarily feasible to switch this to an NSPoint; it me

Re: Key-Value Observing speed

2010-03-12 Thread Gwynne Raskind
On Mar 12, 2010, at 4:52 PM, Peter Ammon wrote: >> While profiling a project I'm working on, I found that while most of my time >> was being spent in glFlush() (which is completely expected for an >> OpenGL-based game), a non-trivial amount of time is being spent in dozens of >> KVO internal met

Re: Key-Value Observing speed

2010-03-12 Thread Peter Ammon
On Mar 12, 2010, at 9:35 AM, Gwynne Raskind wrote: > While profiling a project I'm working on, I found that while most of my time > was being spent in glFlush() (which is completely expected for an > OpenGL-based game), a non-trivial amount of time is being spent in dozens of > KVO internal me

Key-Value Observing speed

2010-03-12 Thread Gwynne Raskind
While profiling a project I'm working on, I found that while most of my time was being spent in glFlush() (which is completely expected for an OpenGL-based game), a non-trivial amount of time is being spent in dozens of KVO internal methods and functions. Most especially, I noticed that KVO (or