Whenever I touch the screen and start dragging my finger around, for example whenever moving the character or whenever rotating the camera, my frames drop massively.
A lot of players have been reporting this problem as well.
When trying to optimize our games for games that are already expensive on devices such as mobile phones, having the engine add a lot of time to the frames whenever the camera is rotated or the character moves makes it a lot more difficult.
Thank you for the detailed report! It looks like processInput is taking a significant amount of time in some cases. I’ve added this to our backlog to investigate.
I noticed a similar issue on low-end console devices which I reported a couple of years back. I’d speculate that there could be two issues interacting here, not one.
(1) It looks like inputs with positions / deltas queue up and are processed all at once at the start of the frame, which makes this heavily dependent on input polling rate. A modern 240Hz console controller will send ~4 thumbstick movements per frame at 60 FPS, then Roblox will process each of those 4 consecutively in one frame. Maybe they could be summed up before any of this happens instead.
A mobile device I have from 2019 also seems to have a higher touch input rate than 60Hz and you can see it simulating touch input changes multiple times each frame in this screenshot despite running at close to 60 FPS (this was a particularly bad frame but shows those 4 distinct input segments more clearly):
You can feel this effect compound on low power devices, e.g. when I test Dragon Soul on a PS4 and move the camera with the right thumbstick, my framerate halves and most of the frame is just input processing:
(2) The UI queries which happen during input seem to process UI subtrees which are invisible. It becomes a problem with deep and complex UI structures. Reproduction file for this was sent in DMs @DrRanchDressing.
Hi @NiceDrift thank you for the additional info and linking your other thread. I’m having a hard time finding the repro file, do you mind resending it to me?
Was it sent recently, and was it sent to me or someone else?
I re-sent in DMs just now. To reproduce, upload to a place and then drag your finger around on a mobile device (effect is more prevalent on older devices e.g. 2016 era phone) and refresh the web microprofiler while doing that. You should see the same as in the screenshots I took.
Hey @NiceDrift I sent you a DM. For some reason I’m not seeing your DMs to me. It sounds like @stadium_parkour got your repro file though, so we should be good. Thanks!