Closed bartkrekelberg closed 8 years ago
This pull would solve #45 .
@bartkrekelberg This worked but didn't work. Functions work and can be redefined, but evaluating a dynamic property is very slow. It was taking >0.5ms per get, so behaviorDemo, for example, gets zillions of frame drops. Does it work for you?
@bartkrekelberg Re: factorial.m. I think your version retains a problem that I created earlier, whereby it doesn't check across plugins whether it should expand singletons (it only checked across props of a plugin).
I've pushed a different solution to master which works as far as I can tell, so I think this issue is resolved. Check my solution if you like.
I tested timing, and gets/sets were taking less than 0.1ms (function calls 0.2ms ) That can still add up in the behavior.m plugin, but we may be able to optimize there.
Also the calls were similar in an older version of functions. I did notice that frame drops are unreliable in my setup. Missed frames can be 98% while PTB reported at most 10% drops (based on Screen('Flip')).
I'll try to optimize some get/set calls first. Then 'll have a look at the dropped frames.
By rewriting set/get methods I think this version handles properties and function properties properly.
Ready for a test...
I also removed a bunch of orphaned files/demos.