In Studio, moving the mouse cursor in the viewport while providing no other mouse inputs causes lag spikes on a consistent period of about once every second. These spikes occur in both play solo mode and in Studio as a whole, and they do not occur unless the mouse is being moved over the 3D viewport.
I provided repro steps at the very bottom of the post.
I made sure to:
Disable all my plugins including any local plugins & restart Studio
Restart Windows before testing
Test in a Baseplate
I timed these spikes and observed the spikes getting more severe the longer the mouse is consistently being moved for (By about 21 seconds, I had counted 21 spikes, but the spikes began taking full seconds which prevented me from making consistent measurements past that).
These spikes appear as large time gaps between data in the microprofiler (the spike is not attributed to any bars in the microprofiler). It appears that the main thread hangs, while some threads like FMOD and RakNet threads continue to run unaffected.
The spikes also only occur if no other mouse input is given. For example, holding mouse button 3 (middle mouse), mouse button 2 (right click), mouse button 1 (left click), or even mouse buttons 4 or 5 (forward/backward in history in web browser, no effect in Studio) causes these spikes to vanish.
Observed Microprofiler gaps during spikes (FPS unlocker enabled):
I’m now experiencing this as well. I first noticed it happening while in Test mode and doing firstperson/shiftlock and then quickly looking around, but it doesn’t happen in thirdperson. It seems like it lags whenever the mouse is moving over the viewport as long as you aren’t clicking on anything. Very strange, and very aggravating.
Just experienced this today. From some research, it looks like this is related to the mouse input polling rate. Though, when I adjusted the polling rate switch on my gaming mouse, it didn’t seem to make a difference.
I also noticed that the camera controls were acting strange and erratic when panning in testing mode.
I was able to apply a temporary fix by switching to a different mouse, but this is not a long-term solution. The mouse worked just fine yesterday, and I did not install any new drivers.
This has also been happening to me recently after installing a new graphics card. Only happens in one game, and doesn’t lag if i hold down a mouse button or keep the mouse still. Only lags when i dont click any mouse buttons while moving.
In this video, i stop lagging whenever i hold down a mouse button, but when i release it my frames drop significantly.
Same thing happening here and it’s pretty annoying. I can’t find any good solutions for it. From an older forum post lowering mouse polling rate below 500Hz helped to the extent of moving the mouse around in studio with losing a lot of FPS, but when playtesting my game in Studio the lag persists and moving my mouse makes FPS go as low as 10…
Hey, I actually experienced this “weird” camera effect as well! (Hopefully the same thing we’re both thinking about), for me personally it sometimes felt like either getting stuck or becoming higher sens… Just not moving where it should have.
I tried switching mouse too, but no luck. It seems on a laptop with a trackpad this issue doesn’t persist-
This issue is likely different to the one I reported.
The behaviour I reported happens consistently at an interval of about once per second and goes away if you click or right click whereas yours happens strictly when you are left clicking and it happens constantly instead of once per second. Your game is also probably doing some raycasts with the mouse so that’s likely related to the lag spikes you’re encountering.
This is how the workspace runs when all scripts are disabled:
Not sure if our issues are related but my code isn’t the cause. My issue only occurs in studio, and gets worse as more players are added to the local testing. Also the lag stops when i hold any key on my mouse, not just left click.
Can confirm this issue is happening to me. On my M1 Max, FPS drops consistently while moving the mouse. It seems to improve when closing any docked windows in Studio. On my Windows desktop, there is no issue. I’ve been trying to debug my game for the past hour looking for performance issues - it turns out this is on Roblox’s end.