Improve first-open performance of the new Stats screen - #25931
Improve first-open performance of the new Stats screen#25931crazytonyli wants to merge 2 commits into
Conversation
|
| App Name | WordPress | |
| Configuration | Release-Alpha | |
| Build Number | 33963 | |
| Version | PR #25931 | |
| Bundle ID | org.wordpress.alpha | |
| Commit | b1cc092 | |
| Installation URL | 3plgre04dm0l8 |
|
| App Name | Jetpack | |
| Configuration | Release-Alpha | |
| Build Number | 33963 | |
| Version | PR #25931 | |
| Bundle ID | com.jetpack.alpha | |
| Commit | b1cc092 | |
| Installation URL | 5uisvr0aqs1i0 |
jkmassel
left a comment
There was a problem hiding this comment.
This seems generally good, but the bar width is pretty different between the placeholder and the actual data – the screenshots on the PR actually show the issue decently well.
Apart from that it seems good – I tested on two devices side-by-side and the loading is very nice and smooth.
I did not try to match the look, because I don't want to overly complicate the skeleton placeholder view. If we want to match the look, we'd need to pass the selected date range to the placeholder SwiftUI view, which then calculate number of the data points (7 for 7 days, 30 for a month, 12 for a year, plus there is custom date range) and then calculate the width based on that. I feel like that's too much for a placeholder view that's basically a loading indicator. |
|
As it stands now, this would be a visual regression – I understand the desire to keep it simple, but I'm not sure it's with the loss of polish. It's especially pronounced on a chart that shows 30 bar lines 😞 |
0872a07 to
ef439c5
Compare
ef439c5 to
be48d6a
Compare
While the first data set loads, ChartCard and TodayCard rendered real Swift Charts filled with mock data purely as redacted placeholders. Instantiating Swift Charts (and compiling its Metal shaders) inside the navigation transition was a measurable part of the first-open lag. The placeholders are now lightweight shapes drawn in the metric color: the chart card shows rounded bars or a polyline matching the selected chart type, and the Today card shows a gently rising polyline echoing the bell-curve flank its old fixture data produced. Both are replaced by the real charts as soon as data arrives, and previews for the placeholder states are included.
be48d6a to
b1cc092
Compare


Two changes: