Iterable / swift-sdk

Iterable's iOS SDK. Receive and track pushes to Iterable from your iOS app.
https://iterable.com/
MIT License
86 stars 68 forks source link

Thread Performance Checker failure #771

Open tristan-warner-smith opened 1 month ago

tristan-warner-smith commented 1 month ago

We're running the Runtime API checker of Main Thread Checker and Thread Performance Checker and getting some Iterable failures in the logs. Can you take a look at addressing this priority inversion?

Thread Performance Checker: Thread running at User-initiated quality-of-service class waiting on a lower QoS thread running at Default quality-of-service class. Investigate ways to avoid priority inversions
PID: 20354, TID: 241170
Backtrace
=================================================================
3   CoreData                            0x000000018639905c -[NSSQLDefaultConnectionManager _checkoutConnectionOfType:] + 72
4   CoreData                            0x000000018639924c -[NSSQLDefaultConnectionManager handleStoreRequest:] + 48
5   CoreData                            0x00000001864d6a50 -[NSSQLCoreDispatchManager routeStoreRequest:] + 220
6   CoreData                            0x00000001863de6cc -[NSSQLCore dispatchRequest:withRetries:] + 168
7   CoreData                            0x00000001863e1458 -[NSSQLCore executeRequest:withContext:error:] + 3692
8   CoreData                            0x00000001863a9ca8 __65-[NSPersistentStoreCoordinator executeRequest:withContext:error:]_block_invoke.383 + 4144
9   CoreData                            0x00000001863a0098 -[NSPersistentStoreCoordinator _routeHeavyweightBlock:] + 216
10  CoreData                            0x00000001863a849c -[NSPersistentStoreCoordinator executeRequest:withContext:error:] + 1100
11  CoreData                            0x0000000186364f30 -[NSManagedObjectContext executeFetchRequest:error:] + 668
12  CoreData                            0x0000000186363100 -[NSManagedObjectContext executeRequest:error:] + 312
13  CoreData                            0x00000001862b53e4 $sSo22NSManagedObjectContextC8CoreDataE5fetchySayxGSo14NSFetchRequestCyxGKSo0gH6ResultRzlF + 80
14  Reveri                              0x0000000105ba64f8 $s11IterableSDK12CoreDataUtilV18findSortedEntities7context6entity6column9ascending5limitSayxGSo22NSManagedObjectContextC_S2SSbSitKSo20NSFetchRequestResultRzlFZ + 412
15  Reveri                              0x0000000105c39d60 $s11IterableSDK26CoreDataPersistenceContextV8nextTaskAA0aH0VSgyKF + 184
16  Reveri                              0x0000000105c3ae5c $s11IterableSDK26CoreDataPersistenceContextVAA0aeF0A2aDP8nextTaskAA0aH0VSgyKFTW + 32
17  Reveri                              0x0000000105c659c4 $s11IterableSDK0A10TaskRunnerC12processTasks33_510FEDFE1A76AFB09F5BD1DA537AA09CLLyyF + 532
18  Reveri                              0x0000000105c64e24 $s11IterableSDK0A10TaskRunnerC3run33_510FEDFE1A76AFB09F5BD1DA537AA09CLLyyF + 316
19  Reveri                              0x0000000105c656a0 $s11IterableSDK0A10TaskRunnerC12scheduleNext33_510FEDFE1A76AFB09F5BD1DA537AA09CLLyyFyycfU_yycfU_ + 168
20  Reveri                              0x0000000105beb31c $sIeg_IeyB_TR + 48
21  CoreData                            0x0000000186369e80 developerSubmittedBlockToNSManagedObjectContextPerform + 156
22  libdispatch.dylib                   0x000000010b1b993c _dispatch_client_callout + 16
23  libdispatch.dylib                   0x000000010b1c1bd8 _dispatch_lane_serial_drain + 916
24  libdispatch.dylib                   0x000000010b1c291c _dispatch_lane_invoke + 420
25  libdispatch.dylib                   0x000000010b1cf2f8 _dispatch_root_queue_drain_deferred_wlh + 324
26  libdispatch.dylib                   0x000000010b1ce754 _dispatch_workloop_worker_thread + 488
27  libsystem_pthread.dylib             0x000000010c92f814 _pthread_wqthread + 284
28  libsystem_pthread.dylib             0x000000010c92e5d4 start_wqthread + 8