You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
In the development branch the VM uses MemberResolver which is a nice saftey wrapper around the old way of getting members but introduces a performance regression.
Accessing Native Object fields is known to be expensive due to the use of Dynamic which on static targets is extremely slow. On the main branch the performance expected is around 10 thousand entitles with 6 property sets per frame at around 30 fps.
MemTest_2026-03-14_23-51-55.mp4
On the dev branch this same test leads to a not responding window or very low framerate.
MemTest.2026-05-05.00-53-47.mp4
I did some digging to find the culprit and its due to var instanceFields:Array<String> = nativeClass == null ? null : Type.getInstanceFields(nativeClass);
On native targets such as hxcpp this function is ran in the hot loop scanning every field of the class essentially bottlenecking the VM.
I recommend we either attempt to cache the instanceFields or remove it from MemberResolver.
In the development branch the VM uses
MemberResolverwhich is a nice saftey wrapper around the old way of getting members but introduces a performance regression.Accessing Native Object fields is known to be expensive due to the use of
Dynamicwhich on static targets is extremely slow. On the main branch the performance expected is around 10 thousand entitles with 6 property sets per frame at around 30 fps.MemTest_2026-03-14_23-51-55.mp4
On the dev branch this same test leads to a not responding window or very low framerate.
MemTest.2026-05-05.00-53-47.mp4
I did some digging to find the culprit and its due to
var instanceFields:Array<String> = nativeClass == null ? null : Type.getInstanceFields(nativeClass);On native targets such as
hxcppthis function is ran in the hot loop scanning every field of the class essentially bottlenecking the VM.I recommend we either attempt to cache the
instanceFieldsor remove it fromMemberResolver.