Studio gets lag spikes after searching explorer, modifying multiple instances - microprofiler accuses "LegacyLock" and "Write Marshalled"

After searching through the explorer and modifying a big number of instances, Studio starts having lag spikes which happen in a consistent frequency and last until the place file is closed and reopened. Upon checking the microprofiler, the largest labels near the spikes are Write Marshalled and LegacyLock.

The bug happens consistenly whenever I do the following steps:

  1. Open a place file with a big number of instances in Workspace (repro place attached below);
  2. Search the Explorer for something which matches a big number of instances, such as Part
  3. Select every search result under Workspace, including classes that are not Parts (in this example);
  4. Modify a property common to most selected instances, such as BrickColor;
  5. Unselect all instances;
  6. Clear the search query.

Studio should start showing lag spikes regularly after these steps.


Repro place: legacylock repro.rbxl (55.6 KB)
Microprofiler dump: microprofile-20201005-184019.zip (645.1 KB)
Specifications:

  • CPU: Intel Core i5-5200U @ 2.20 GHz
  • GPU: NVIDIA GeForce 920M
  • Memory: 8.0 GB DDR3

Note about reproduction place: the effect gets worse the more instances are selected, so if it is not apparent with the number of trees included in the demo, copy and paste them over a few times and repeat.

7 Likes

I had to copy the set of trees 5 more times and after I did, following the repro steps and then deselecting by clicking into the viewport was all I needed to do to make it lag spikes start.

If I click out of the viewport on Studio’s UI (e.g. into an input, on the ribbonbar, etc.), the spikes stop until I refocus the viewport. If I insert a new part or change the selection, the spikes completely stop.

I think the last selection is being tracked since changing the selection fixes it. Maybe the new Lua draggers are doing it, or another new tool.

4 Likes

Thanks for the report! We’ve filed a ticket to our internal database and we’ll follow up when we have an update for you.

4 Likes

Hi. Our engineers cannot reproduce this issue. Can you try and see if its still occurring for you?

I can confirm that the issue is still happening to me on Jan 9th 2021, and that inserting a part or changing the selection stops the lag spikes as mentioned in this reply:

The issue starts specifically when I deselect everything and ends when I insert a new instance, change the selection or close the place. On my computer, I managed to get it happening noticeably with only 32 copies of the tree in the repro place, but on beefier computers a higher number might be necessary to see the spikes clearly (I haven’t tested. At ~80 copies or so my Studio freezes irrecoverably).

I took another microprofile dump in case it helps:
microprofile-20210109-123509.zip (597.3 KB)

Please let me know if any other info is necessary, and thanks for following up on this.

3 Likes