cocos-engine icon indicating copy to clipboard operation
cocos-engine copied to clipboard

Disabling loose mode greatly affects performance on Web Mobile platform

Open winmain opened this issue 2 years ago • 2 comments

Cocos Creator version

3.6.3, 3.7.1

System information

Android 10 on OnePlus 5, Vivo v11, Xiaomi Redmi Note 8 Pro, iOS 16.3.1 on iphone 11

Issue description

Disabling loose mode greatly affects performance on Web Mobile platform on mobile devices (Android, iOS).

The bug seems to appear only on mobile devices and doesn't affect desktop browsers (or I didn't notice it).

Below is the screenshots of test project run on Chrome on OnePlus 5 phone. The first one was build with loose mode on. The second one with loose mode off (the strict mode).

As you can see, renderer time was increased from 5ms to 23ms and FPS drops from 60 to 41 (or even worse).

Run with loose mode on:

LooseModeOn

Run with loose mode off:

LooseModeOff

The loose mode checkbox:

Screenshot 2023-03-23 170859

Relevant error log output

No errors were found

Steps to reproduce

  1. Unpack and open attached test project
  2. Open Project Settings / Scripting and check or uncheck "Enable loose mode" checkbox
  3. Build project for Web Mobile platform
  4. Run the build on mobile device

Minimal reproduction project

testcocosbug.zip

The test project is a grid of sprites mixed with text to make some load for the browser. There are no something special inside.

winmain avatar Mar 23 '23 17:03 winmain

Hi @winmain , thanks for your feedback. What browser did you use on your oneplus5 cell phone? Did you try it on other android phones?

dumganhar avatar Dec 07 '23 10:12 dumganhar

I think loose configuration should be configured with sub items rather than just a on/off global switch.

dumganhar avatar Apr 12 '24 08:04 dumganhar