Skip to content

Optimize runtime symbol and dynamic text resolution#42

Open
Tutez64 wants to merge 1 commit intoopenfl:masterfrom
Tutez64:misc/cache-runtime-symbol-and-text-resolution
Open

Optimize runtime symbol and dynamic text resolution#42
Tutez64 wants to merge 1 commit intoopenfl:masterfrom
Tutez64:misc/cache-runtime-symbol-and-text-resolution

Conversation

@Tutez64
Copy link

@Tutez64 Tutez64 commented Mar 17, 2026

Summary

This optimizes several hot runtime symbol and dynamic text resolution paths.

Changes

  • cache resolved runtime classes for Animate sprite/button symbols
  • cache resolved runtime classes for SWFLite sprite/button symbols
  • cache SWFLite unserializer class/enum resolution results
  • cache dynamic text font resolution for Animate symbols
  • cache dynamic text font resolution for SWFLite symbols

Impact

These changes keep runtime behavior unchanged while reducing repeated Type.resolveClass, fallback resolution work, and repeated embedded font lookup/normalization during asset instantiation.

Cache resolved runtime classes for Animate and SWFLite sprite/button
symbols so repeated instantiations do not call Type.resolveClass for
the same symbol names over and over.

Cache SWFLite unserializer class/enum resolution results to avoid
repeating the same fallback resolution work across deserialization.

Cache dynamic text font resolution for Animate and SWFLite symbols so
TextField creation does not repeatedly enumerate and normalize the
same embedded font names.

These changes keep runtime behavior unchanged while reducing overhead
on hot asset instantiation paths.
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