Construct-bugs
Construct-bugs copied to clipboard
Possible post r389 and r409 performance regression
Problem description
Post r389, there seems to be performance regression as seen in #8259 .
A change was done in r409 to improve the performance regression, but there still seems to be a significant delta in performance between r389 and r409.
Attach a .c3p
This is the same test used in #8259
Steps to reproduce
Run test on r389 and r409, note CPU and FPS.
Observed result
Testing on r389 and r409, note CPU and FPS, in our testing in the community there looks to more than a 10% difference.
Expected result
Similar performance.
More details
Doing some chrome dev perf traces, it seems like GetX and GetY have the biggest perf difference between r389 and r409. As an experiment, I exported r409 to html and edited the commonACEs.js file to revert only GetX() and GetY() to their prior definition in r389. This was only an experiment to see if a possible cause could be found.
Testing again, the modified r409 version did get a nice performance boost. Here are the three together screen grab from community:
I have 3 versions available on the web, first is vanilla r409, second is r409 with GetX() and GetY() modified, third is the rest of the similar functions to GetX and GetY modified. The last one has the best performance.
https://kindeyegames.com/perfOrig/ https://kindeyegames.com/perfMod/ (GetX, GetY changed) https://kindeyegames.com/perfModMore/ (remaining similar functions changed)
Example of the changes done:
return GetWorldInfo(this).GetX()
(r409) back to
return this.GetWorldInfo().GetX()
(r389)
Affected browsers/platforms:
First affected release: r390 r409 (partial fix)
So, this is mainly an observation, it would obviously be nice to not have performance regressions, but C3 is being updated for SDK V2 and other features, so I understand it is a question of priorities. if the changes above appear to be the cause, perhaps there is another way to get the same 'feature' result without as much perf impact?
System details
View details
PASTE HERE