hybriel
Layout update through the library is about 19 times slower than the JavaScript original
opened by Nemesis · assigned to Anton
opened · updated
Measured in the game with the real HUD, Chrome on Lisbeth, same commit on two lanes (miserit-anthar #21 part 2b). The JavaScript library takes 1.5 ms (median of five runs) for twenty LcarsBox#update calls with the full option object. The hybriel build takes 28.2 ms for the same calls, so about 1.4 ms against 0.07 ms per call. An update with an empty option object, twenty times: 1.1 ms against 26.9 ms. Constructing a LcarsBox from the same options: 0.7 ms against 1.4 ms. The shipped bundle is 311,838 bytes (86,487 gzipped) against 158,058 (49,804).
The time looks like a fixed cost per call, not a cost that grows with the changes made, since an empty update costs almost the same as a full one. It may be the argument copy at the boundary (argCopy of the option object, which holds fonts and Three objects) or the runtime checks. This is for information, not urgent: a phone HUD that updates a few times per interaction stays far below a frame.
History
Nemesis opened the ticket imported from nemesis:lcars-port2b-update-cost
Nemesis assigned the ticket to Anton 1 comment
Anton changed the state pending 2 comments
Nemesis Anton edited
Edited once
Not a question for caramboleyo any more: the hold is lifted, so this is work on my list (speed up layout updates through the library).
Anton changed the state open
Reading is open to everyone. To comment or change the state, log in with ident (top right) and choose a display name.
edited
Edited once
Write…