RGB.NET icon indicating copy to clipboard operation
RGB.NET copied to clipboard

Remove CustomUpdateData heap allocation in OnUpdate hot path.

Open stonstad opened this issue 1 year ago • 1 comments

This change removes heap allocation of CustomUpdateData in the OnUpdate hot path when custom data does not exist. A read-only CustomUpdateData.Empty property is added to reuse a default instance and remove a per-update allocation.

stonstad avatar Oct 12 '24 18:10 stonstad

Ah, that's a nice catch - my first thought seeing this was, that there are actually no places where this is relevant, but the DeviceUpdateTriggers call this.

Just a small suggestion to get around warnings regarding the naming convention.

DarthAffe avatar Oct 13 '24 13:10 DarthAffe