Closed kennyluck closed 11 years ago
Some notes (although this might be too obvious...):
PerformanceSpriteTest
with both update()
and draw()
in a frame.update()
and they have no draw()
(the sprites are set setVisible(false)
)The test results are in the wiki. It seems that these optimizations don't have an effect on JavaScriptCore and Chakra. Also, in Firefox, improvement on A1/B1/C1 can't be observed. That's might be because Firefox don't do "deferred Canvas API" like Chrome does. This optimization on Firefox might manifest in a game as the update()
would be heavier than that in PerformanceSpriteTest
.
These showcases are accompanied by two pull requests to
cocos2d-html5
: #1015 and #1016.These tests are the extreme conditions when the above two patches work the best. I have a bunch of comments in the tests already so I'll refrain from talking too much. Feel free to ask me questions.
VirtualMachineTestMainScene
is pretty similar toNodeChildrenMainScene
. In fact, I think these two should be merged if I can find Ricardo.I haven't tested these on JSB.
Test results will come later.