mixpanel / mixpanel-swift

Official iOS (Swift) Tracking Library for Mixpanel Analytics
https://mixpanel.com
Apache License 2.0
434 stars 234 forks source link

Excessive disk usage report (1+GB) #584

Closed RamblinWreck77 closed 1 year ago

RamblinWreck77 commented 1 year ago

Version: 4.0.4

Noticed this in our Xcode Organizer "Reports" section under "Disk"

Screenshot 2023-02-06 at 1 51 20 PM

The insight seemed interesting:

Screenshot 2023-02-06 at 1 55 04 PM

Sampled Backtrace:

Screenshot 2023-02-06 at 1 55 54 PM
RamblinWreck77 commented 1 year ago

From the doc link

The system throws an exception and generates a report when the disk writes from your app exceed a certain threshold in a 24-hour period. View the aggregated exception logs for a version of your app in the Disk Writes pane in Xcode Organizer or capture them with [MetricKit](doc://com.apple.documentation/documentation/metrickit).

Not super knowledgeable on SQL optimization, but the docs here seem interesting:

https://developer.apple.com/documentation/xcode/reducing-disk-writes

jaredmixpanel commented 1 year ago

@RamblinWreck77 I've released v4.1.1 which adds an index and enables WAL journaling mode. I'm going to close this for now. Feel free to re-open if the issue persists.