Large performance issue caused by "CoreScripts/SoundTelemtry"

Description:

Having a large performance issue caused by “CoreScripts/SoundTelemetry”. While running around in a map-only version of my game to ensure no scripts are doing anything, I noticed a nearly 7ms amount of time being spent by this. I only have 29 sounds in this game.

I noticed this recent change in CoreScripts. Checking IsA on every descendant being added to the game in Lua doesn’t seem very performant.

https://github.com/MaximumADHD/Roblox-Client-Tracker/blob/f87f9ab4dd1b67a2e079b9aea732f08c865dee16/scripts/CoreScripts/CoreScripts/SoundTelemetry.lua#L270

Reproduction

Use a large world with Streaming enabled, and manuever around at an above average speed.

Game link is here but is private. BROADVIEW BUILDING BRANCH - Roblox

System Information
Tested on two machines:

  • M2 Macbook Pro, 32GB Ram, macOS Ventura
  • Ryzen 7 5800X, RTX 3070 Ti, 32GB Ram, Windows 11 22H2
19 Likes

Thanks for the report! We’ll follow up when we have an update for you.

7 Likes

It looks like some changes were made and they only now hook up DescendantAdded if the telemetry flag is enabled, as well as changed it to use ClassName instead of IsA.

However I don’t really understand why things like this are being done on the Lua side as it is inherently less performant

Just confirmed this fix is out, is anyone still having trouble?

1 Like