Skip to content

Use native vectorized plots for Apple line charts - #2762

Open
AlexSchmidt1999 wants to merge 4 commits into
ryanbr:mainfrom
AlexSchmidt1999:codex/upstream-chart-plots-oct10
Open

AlexSchmidt1999 wants to merge 4 commits into
ryanbr:mainfrom
AlexSchmidt1999:codex/upstream-chart-plots-oct10

Conversation

@AlexSchmidt1999

@AlexSchmidt1999 AlexSchmidt1999 commented Oct 10, 2026 •

Copy link
Copy Markdown

What this PR does

Dense Trends and overview HR charts create a Swift Charts mark for every display point. On iOS 18+ and macOS 15+, they now use LinePlot and AreaPlot, following Apple's vectorized plot guidance. Older systems keep the existing marks.

Samples, segment boundaries, styles, axes, annotations, selection, and accessibility use their existing paths. No renderer or dependency is added.

Both charts choose the drawing path outside the chart builders and return native AnyChartContent for the curve. The vectorized blocks have their own availability annotations. This avoids the obsolete builder overloads selected by Xcode 26 inside the version check and keeps modern plots enabled.

Type of change

  • Refactor / cleanup

How it was tested

A native macOS ImageRenderer probe compared the final change with the previous marks using synthetic data, four warmups, and eight measured renders. Median render time fell from 8.05 to 5.84 ms for 365-point Trends and from 6.13 to 4.31 ms for 288-point overview HR. All eleven image pairs were pixel-identical, including gaps and annotations.

Local macOS and iOS Simulator Debug builds passed with Xcode 27. Of the StrandDesign tests, 133 passed and one existing English-label test was skipped on this German host. Source hygiene and translation checks passed. The CI build passed on this PR head too, including the Xcode 26 iOS build and macOS app tests. All 16 checks passed.

The combined fork with this fix also builds for macOS and iPhone.

Checklist

  • Generated projects, build output, and credentials are excluded.
  • No new dependencies or destructive strap commands.

GitHub validation was rechecked on October 11 at 711c2159565d. All 16 registered checks passed, including the macOS app build and tests and the iOS app build.

iPhone follow-up, October 16

The combined build with native vectorized plots is running on the owner's iPhone. The owner reports that it looks smoother in everyday use.

The anonymized Today measurements from the combined fixes record 1 late callback out of 3,873 (0.026%) over 64.71 seconds, compared with 0.536% over 860.79 seconds before the day-cycle scheduling change. The worst callback interval falls from 159.6 to 63.4 ms. The latest merged installation adds a 6.29-second sample with zero intervals over 33 ms. The report includes the callback counts and source revisions. Raw archives and personal data stay local.

@AlexSchmidt1999

AlexSchmidt1999 commented Oct 10, 2026 •

Copy link
Copy Markdown
Author

LinePlot and AreaPlot are still enabled on iOS 18+, including iOS 27. Older systems keep the existing marks.

The failure was in the Xcode 26 CI build. It selected buildPartialBlock overloads that are obsolete since iOS 18, while local Xcode 27 builds accepted the code. Both charts now choose the drawing path in a normal function and pass native AnyChartContent into the builder. The vectorized blocks have their own availability annotations. Samples and styles stay the same.

Local macOS and iOS Simulator builds passed. Of the StrandDesign tests, 133 passed and one existing English-label test was skipped on this German host. All eleven synthetic render pairs were pixel-identical, including gaps and annotations. The CI build passed too, including the Xcode 26 iOS build and macOS tests. All 16 checks passed.

No new iPhone scrolling measurement was taken for this compiler fix.

@AlexSchmidt1999

Copy link
Copy Markdown
Author

I am using NOOP 12.1.0 Release build 456 on my iPhone 17 Pro Max, and the app runs very smoothly in everyday use.

This PR is included in that combined build, together with my other Apple changes and the performance fixes from #2724 by @UtkuDenizAltiok and #2705 by @kavemang. The installed source is d67cceb5.

Both Apple builds and the local app, analytics, database and Python test suites passed for this combined build.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants