Open OAGr opened 6 months ago
This feature is mostly doable now, but I expect that it'll become useless over time, because of its global semantics:
Also, it's not clear how we could collect these timings from widgets; I guess const f = useReportRunningTime(); f(value.context.path, ms);
is possible...
So, my alternative proposal is to measure widget render timings individually, and find a way to display them on individual items. (maybe show a number or a yellow "!" icon when the time is >10ms)
Good points!
At the same time, here are some things I'm thinking of:
We could wait for a more advanced system - at the same time I don't want to let the perfect be the enemy of the good.
I think this could be a useful feature if it's a really quick thing to do before the more thorough jobs, but it's not particularly important.
Related: #3257. (Btw, I'm not even sure how to detect when React commits the background-rendered DOM tree to the main tree, to measure the full time, but there must be a way?)
Description of suggestion or shortcoming:
In this model, most of the time is spent rendering the Plot, but this isn't captured in the simulation count.
https://squigglehub.org/models/benthamite/vote-trading
After this, it would be useful to also show long things like initial calculator renders take, and Spec/other tests.