Rapid touch movement cause framerate drop

Have a problem with WebGL build, fps drops significantly, up to -30, when finger is moving on touch screen. On scene i have spawned bunch of cubes 10x10x3 grid to simulate some scene. Have only 1 script to count and show fps.

  1. Spawn some amount of object
  2. WebGL build
  3. Open in mobile browser
  4. Touch screen and move it rapidly

Here is:
video
Webgl build
Project
Profiler data with 60 and 120 hz. With test case: 0s-6s do nothing, 6s-12s move touching screen, 12s-18s do nothing. Its been recorded in android webview

Tested on android 14, realme 9pro, Chrome
screen has 120hz, tested on another device with 60 hz it has no lag

Thought it maybe multitouch bug, setted WebGLInput.mobileKeyboardSupport = false, no effect

UPD
I’ve been able to reproduce it in desktop chrome, just need to:

  1. Open Dev tools
  2. Toggle device toolbar (ctrl+shif+m for windows)
  3. set cpu throtling x4( i have 144 hz monitor, so it will be arround 30-40 fps, and drops to 20-24 fps)

Hey @PlotvaIzLodzya,

I tried to repro on a few different devices I have and wasn’t able to reproduce what you’re describing. I tried on an iPhone 14 Pro, iPad Pro 3rd Gen, and a Pixel 6. I tried building locally with mobileKeyboardSupport disabled and the only difference I saw was the framerate was stable instead of increasing with taps.

When you tried testing with the keyboard disabled, did you clear your browser history and restart the browser?

Unfortunately I don’t have any other mobile devices on hand. What other device did you test with? Do you have access to any others to see if you can reproduce it on any other hardware?

Are you sure you don’t have some debug spew happening such as printing out the latest touch event to Debug.Log()? If so, then rapid finger motion would cause massive console spew, which definitely can / will affect framerate.

Yes, i restarted chrome browser and tried in incognito.

Yes the only code in project is

Yes, i tested, was able to reproduce it on redmi note 10 pro(120hz)

I have researched more. And now i think its probably because of screen refresh rate - 120hz or android version 14(or affix pro hehehe).

redmi note 10 pro, android 14, 120 hz - reproduced in android webview, 60 hz - not reproduced, or drop is just significantly less like 5-10 fps
realme 9 pro , android 14, 120 hz - reproduced in webview and chrome, 60 hz - not reproduced, or drop is just significantly less like 5-10 fps
Xiaomi mi 10T android 12, 144 hz - not reproduced
xiaomi mi 10 light android 12, 90 hz - not reproduced
samsung Galaxy Note 20 Ultra, android 11, 120 hz - NOT reproduced, but i think its maybe fake, because in game fps was not capped at fresh rate, always shows 60-70

found post about targetFrameRate in WebGl

it implies that

so if targetFrameRate is 120 it will work and skipFrames will 0.5(dont know value type so it can be 0), dont know what it will cause and will it affect performance but still

I’ve been able to reproduce it in desktop chrome, just need to:

  1. Open Dev tools
  2. Toggle device toolbar (ctrl+shif+m for windows)
  3. set cpu throtling x4( i have 144 hz monitor, so it will be arround 30-40 fps, and drops to 20-24 fps)

Also added profiler data from 60hz and 120hz