flyover / box2d.ts

A TypeScript port of Box2D
https://flyover.github.io/box2d.ts/testbed
MIT License
405 stars 85 forks source link

The performance drops to 20+fps again. (since commit a65d936) #60

Closed jcyuan closed 2 years ago

jcyuan commented 5 years ago

today I just pulled the newest code from commit 'a65d936', and used the benchmark made by @finscn before http://fatidol.com/phy-benchmark/box2d-ts-test.html to test the performance.

the result is, the FPS drops to 20+ fps again.

also I have recorded 2 profiles to analyze the difference, I found that the new version made a big GC in the b2WorldManifold::Initialize function:

image (gc)

image (no gc: old version)

jcyuan commented 5 years ago

and, could you please publish a release once a version is stable? thank you so much.

Fxlr8 commented 5 years ago

@jcyuan what is the last stable commit that can be used?

jcyuan commented 2 years ago

@jcyuan what is the last stable commit that can be used?

hmmm, i'm so sorry, missed this somehow and just found while tidying my issue list up...

you can try this: https://github.com/flyover/box2d.ts/issues/74#issuecomment-717122457

thanks.