Closed tonypee closed 9 years ago
The docs on the front page say:
Which makes it seem the behavior you get is as expected. But the docs also say:
Which seems to be a bit conflicting.
Perhaps @Yomguithereal can elaborate on what the expected behavior should be and update the docs accordingly?
"By access" is very bad way, because you can have many ui sources that use monkey fields. But every mutation recalculation is also bad, i think it's can be recalculated on end of transactions (nextTick), or on sync read, if it's not cached.
@markuplab I'm pretty sure there is a system in place that prevents it from needlessly recalculating.
Okay, so let me explain what is the expected behavior of the monkeys:
If this is not what you observe, and @tonypee's example seems to pinpoint this exactly, then there is a bug I must fix.
@Yomguithereal it seems that your last point...
...is not the case in @tonypee's example. It seems to be recalculated every time a push to the watched path is done.
@tonypee can you provide a repro repo?
If the test case presented by @tonypee is full, no need for a repo. If this is all there is to such example then nothing should be logged to the console. So there indeed seems to be a bug.
Ok. I've pinpointed the source of the bug I think. Patch incoming.
perfect - thanks!
Will need to fix some other things but a 2.2.0
is definitely coming soon.
Closing this then.
It seems that the monkies are a little too fit.
So, the monkey is evaluated 3 times. It should only be on access no?