How to speed up HKStatisticsCollectionQuery in iOS 9.3?
问题 It seems HKStatisticsCollectionQuery is incredibly slow in iOS 9.3. It can take upwards of 40 seconds to return hourly statistics for a year for active calories where it took 1 or less before. let predicate = HKQuery.predicateForSamplesWithStartDate(anchorDate, endDate: endDate, options: []) let query = HKStatisticsCollectionQuery(quantityType: quantityType, quantitySamplePredicate: predicate, options: statisticOptions, anchorDate: anchorDate, intervalComponents: interval) 回答1: After many