Skip to content

Cache timeline instance fields by class name#41

Open
Tutez64 wants to merge 1 commit intoopenfl:masterfrom
Tutez64:misc/cache-instance-fields-in-timelines
Open

Cache timeline instance fields by class name#41
Tutez64 wants to merge 1 commit intoopenfl:masterfrom
Tutez64:misc/cache-instance-fields-in-timelines

Conversation

@Tutez64
Copy link

@Tutez64 Tutez64 commented Mar 17, 2026

Summary

This caches Type.getInstanceFields() results per class name in timeline code.

Motivation

Timeline attachment/update can hit the same reflection path many times when many symbols of the same class are instantiated.

Changes

  • cache instance field lists by class name in AnimateTimeline
  • cache instance field lists by class name in SymbolTimeline

Impact

This reduces repeated reflection work and should lower CPU and GC pressure in symbol-heavy scenes.

Cache Type.getInstanceFields() results per class name in SymbolTimeline and
AnimateTimeline to avoid repeated reflection during clip attachment/update.
This reduces CPU and GC pressure when many symbols are instantiated.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant