polymod icon indicating copy to clipboard operation
polymod copied to clipboard

[ENHANCEMENT] Reflection caching

Open EliteMasterEric opened this issue 3 years ago • 0 comments
trafficstars

Querying the list of properties and fields on an object on HXCPP platforms is very expensive, and it could be a moderate performance benefit to cache this information when able.

  • Create a map and store the result of Reflect.fields() on scripted classes.
  • Check whether a field is a property and use setField over setProperty where appropriate.
  • Check timings to gauge performance improvements.
  • Check whether reflection caching is slower than not using it on JS.

EliteMasterEric avatar Jul 17 '22 00:07 EliteMasterEric