Skip to content

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

Open
@zhefengzhang

Description

@zhefengzhang

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    BugNeeds TriageNeeds to be assigned by the team

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions