mirror of
https://github.com/enso-org/enso.git
synced 2024-12-25 08:43:34 +03:00
This change makes EnsoGL runtime stats be always collected, even when EnsoGL `Monitor` panel is not visible. Those stats are intended to be used in the future by a profiling framework. **Performance impact:** Continuous collection of stats introduces an overhead of two Web Performance API `now()` calls in each frame of the main rendering loop, plus a small number of simple arithmetic calculations. This is assumed to be a negligible and acceptable overhead. #### Visuals A screenshot of the Monitor panel in full `ide` after applying the PR, taken in IDE built with `./run dist`: <img width="991" alt="Screenshot 2022-02-14 at 16 11 42" src="https://user-images.githubusercontent.com/273837/153891378-8a2fb333-34ce-46ce-99df-7d796817310c.png"> A recording, also in IDE built with `./run dist`; note that FPS is impacted by the act of recording itself: https://user-images.githubusercontent.com/273837/154104016-49a12e23-1210-4477-9743-ec1611e5b4ed.mov https://www.pivotaltracker.com/story/show/181093601 # Important Notes - Responsibility for controlling how `Stats` gathering and calculation is performed at various points in the main rendering loop was removed from `Monitor` - the `Monitor`'s purpose is only to display existing data, it should not influence how the data is collected. - Two previously existing distinct `Monitor` structs were merged into one, to avoid confusion; after previous refactorings, the remaining `stats::Monitor` did not have much useful code anyway. - In `stats` package, refactoring was done, to make `StatsData` a "dumb", data-only type, and to move the logic related to stats collection and frame tracking to other helper types. [ci no changelog needed] |
||
---|---|---|
.. | ||
js | ||
src | ||
Cargo.toml |