Showing 1 changed files with 22 additions and 9 deletions
+22 -9
HealthProbe/Doc/04-project/Import-Optimization-Log.md
@@ -759,6 +759,15 @@ The likely bottleneck is per-row SQLite work:
759 759
   blob on fresh first imports only adds CPU, memory, and SwiftData payload size.
760 760
   Existing optional fields remain for old rows and compatibility, but new
761 761
   SQLite-backed captures should report no compact archive finalize cost.
762
+- A 2026-06-06 screenshot from the large-database device showed a fast partial
763
+  full-profile result: `127` metrics, `8,411,713` records fetched, `11.2s`
764
+  duration, and `2` failed metrics (`Blood Pressure Diastolic` and
765
+  `Blood Pressure Systolic`). The attached copied diagnostic text did not match
766
+  that screenshot; it was the older `1.0(1)-1780689890-92064` repeated-capture
767
+  report with `2,625,217` records and `5.8s` duration. Do not use that pasted
768
+  text as evidence for the large-device partial run or for commit `0d61338`.
769
+  A matching Diagnostics text copy is still needed before drawing performance
770
+  conclusions from the large-device partial run.
762 771
 
763 772
 ## Open Issues / Observations
764 773
 
@@ -831,21 +840,25 @@ Prioritize experiments in this order:
831 840
    post-import responsiveness. Expected success: record archive finalize is
832 841
    zero/negligible, details still load from SQLite, and first-import memory /
833 842
    post-save behavior does not regress.
834
-11. Investigate full-profile empty anchored-query cost for zero-count types.
843
+11. Capture the matching Diagnostics text for the large-database partial run
844
+   that showed `8,411,713` records in `11.2s`. Confirm the build identity,
845
+   `CaptureModes`, failed Blood Pressure API call status/details, and whether
846
+   the run was a repeated delta, partial resumed import, or clean first import.
847
+12. Investigate full-profile empty anchored-query cost for zero-count types.
835 848
    Compare slow empty types across reports before changing behavior; any skip or
836 849
    lower-frequency strategy must preserve the promise that full authorized
837 850
    backup can notice newly appearing data.
838
-12. Run a non-chain-start/full-scan benchmark after skipping unchanged `verified` events and fast-pathing already-open visibility ranges. Compare `SummedInsertElapsed`, `Heart Rate insertElapsed`, `Steps insertElapsed`, and `Walking + Running Distance insertElapsed`.
839
-13. Reduce any remaining per-sample SQLite writes for unchanged existing samples during non-chain-start full scans.
840
-14. Profile whether index maintenance dominates first-import insert cost.
841
-15. Consider a guarded bulk-import mode for first observations:
851
+13. Run a non-chain-start/full-scan benchmark after skipping unchanged `verified` events and fast-pathing already-open visibility ranges. Compare `SummedInsertElapsed`, `Heart Rate insertElapsed`, `Steps insertElapsed`, and `Walking + Running Distance insertElapsed`.
852
+14. Reduce any remaining per-sample SQLite writes for unchanged existing samples during non-chain-start full scans.
853
+15. Profile whether index maintenance dominates first-import insert cost.
854
+16. Consider a guarded bulk-import mode for first observations:
842 855
    - keep archive semantics unchanged;
843 856
    - only relax work that can be safely reconstructed or validated;
844 857
    - re-enable normal idempotent paths for incremental observations.
845
-16. Run a fresh first-import benchmark after the unused-index removal and compare `SummedInsertElapsed`, `Heart Rate insertElapsed`, and `Active Energy insertElapsed`.
846
-17. Investigate whether first-import-only deferred index creation or temporary staging tables can reduce `samples` / `sample_versions` / `sample_observation_events` write cost without weakening final archive integrity.
847
-18. Revisit adaptive page sizes only after SQLite write-path costs are reduced.
848
-19. Revisit background / scheduled collection once initial import can finish reliably and post-import UI recovery is bounded.
858
+17. Run a fresh first-import benchmark after the unused-index removal and compare `SummedInsertElapsed`, `Heart Rate insertElapsed`, and `Active Energy insertElapsed`.
859
+18. Investigate whether first-import-only deferred index creation or temporary staging tables can reduce `samples` / `sample_versions` / `sample_observation_events` write cost without weakening final archive integrity.
860
+19. Revisit adaptive page sizes only after SQLite write-path costs are reduced.
861
+20. Revisit background / scheduled collection once initial import can finish reliably and post-import UI recovery is bounded.
849 862
 
850 863
 ## Verification Checklist For Each Optimization
851 864