PlayerParticles icon indicating copy to clipboard operation
PlayerParticles copied to clipboard

Optimize style updates

Open fadookie opened this issue 2 years ago • 1 comments

updateTimers currently gets called for all styles even if they aren't in use.

We shouldn't waste time computing updates for particles that aren't in use.

In addition, it would be nice if a callback was added to style API so styles can know if they are being enabled or disabled.

fadookie avatar Oct 07 '21 16:10 fadookie

Do you have a report showing this?

HexedHero avatar Dec 13 '21 01:12 HexedHero

So few calculations actually get done in the updateTimers method that I think it would be more performance intensive to avoid computing styles that aren't currently being used. The majority of the methods only contain either a single line of code or nothing at all. I'm going to close this for now as I don't think it's necessary, but if you have any more input on the matter I'd be glad to hear it.

Esophose avatar Nov 13 '22 07:11 Esophose