Skip to content

[3.8.6]Games using the cannon.js physics engine experience significant performance degradation after building the project #18703

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
zhefengzhang opened this issue May 9, 2025 · 0 comments
Labels
Bug Needs Triage Needs to be assigned by the team

Comments

@zhefengzhang
Copy link
Contributor

zhefengzhang commented May 9, 2025

Cocos Creator version

3.8.6

System information

MacOS

Issue description

在较低 CPU 性能的设备上测试时,得到以下性能差异。
在未构建发布项目时,游戏添加 100 个物理刚体时帧率为 60,在构建发布后,游戏添加 100 个纹理刚体帧率为 20+。
When tested on a device with lower CPU performance, the following performance differences were obtained.
The frame rate is 60 when the game adds 100 Physics Rigid Bodies when the release project is not built, and 20+ frame rates when the game adds 100 Texture Rigid Bodies after the build is released.

Relevant error log output

null

Steps to reproduce

复现方式:
1、构建发布 web-mobile 游戏
2、在 chrome 浏览器打开游戏
3、在 chrome 浏览器的 performance 工具中降低页面使用的 CPU 性能(降低 6 倍或 20 倍)
4、通过场景的 UI 界面添加物理刚体到场景中,添加 100 个,开启 Shake 选项
Reproduction method:

  1. Build and publish a web-mobile game
  2. Open the game in the Chrome browser
  3. Reduce the CPU performance used by the page in chrome's performance tool (6x or 20x less)
  4. Add 100 physical rigid bodies to the scene through the scene's UI, and enable the Shake option

Minimal reproduction project

CannonjsPhysicsTest.zip

@zhefengzhang zhefengzhang added Bug Needs Triage Needs to be assigned by the team labels May 9, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug Needs Triage Needs to be assigned by the team
Projects
None yet
Development

No branches or pull requests

1 participant