feat(profiling): enable profiling measurement charts if measurements are sent#71258
Conversation
Bundle ReportChanges will increase total bundle size by 140 bytes ⬆️
|
viglia
left a comment
There was a problem hiding this comment.
@JonasBa in vroom in order to differentiate between browser js and react-native js I check whether the runtime is set to hermes.
I think you could make that check as well so that you don't need a different approach and we won't miss out on some of the loading states as you mentioned.
Snippet here below is an extract from the payload returned to the front-end:
"runtime": {
"name": "hermes",
"version": ""
},
The issue is that we need to know this ahead of time in order to show the skeleton and loading UI. If it comes in with the profile response, then it's already too late to show |
…are sent (#71258) React native uses javascript as the platform value which is used both by browser sdk which doesnt report cpu and memory measures. This means we cant know ahead of time if we expect the measurements and simply enable the charts (this toggles loading and the various no measurement states). In order to not enable these charts for browser SDKs and confuse users, we take a different approach and enable the charts on demand, once the data has loaded. We miss out on some of the loading states, but this all happens pretty fast as the profile loads, so I dont think it's a big deal in terms of UX. Fixes #59989
React native uses javascript as the platform value which is used both by browser sdk which doesnt report cpu and memory measures. This means we cant know ahead of time if we expect the measurements and simply enable the charts (this toggles loading and the various no measurement states).
In order to not enable these charts for browser SDKs and confuse users, we take a different approach and enable the charts on demand, once the data has loaded. We miss out on some of the loading states, but this all happens pretty fast as the profile loads, so I dont think it's a big deal in terms of UX.
Fixes #59989