Closed swiftDevTest closed 2 years ago
Thread 0: 0 libsystem_kernel.dylib 0x00000001c1ae65d0 __psynch_mutexwait + 8 1 libsystem_pthread.dylib 0x00000001de182328 _pthread_mutex_firstfit_lock_slow$VARIANT$mp + 304 2 Foundation 0x0000000196f2925c -[NSRecursiveLock lock] + 24 3 xxx 0x0000000104764840 -[LKDBHelper(DatabaseExecute) _deleteWithTableName:where:modelClass:] + 3098688 (LKDBHelper.m:1519)
统计到,在删除数据的时候,加锁的时候,经常卡段,除了切到子线程,有其他优化方法吗
加锁卡顿 说明你其他线程 也在执行 数据库操作, 这个需要你进行逻辑优化,纯代码成面没办法
Thread 0: 0 libsystem_kernel.dylib 0x00000001c1ae65d0 __psynch_mutexwait + 8 1 libsystem_pthread.dylib 0x00000001de182328 _pthread_mutex_firstfit_lock_slow$VARIANT$mp + 304 2 Foundation 0x0000000196f2925c -[NSRecursiveLock lock] + 24 3 xxx 0x0000000104764840 -[LKDBHelper(DatabaseExecute) _deleteWithTableName:where:modelClass:] + 3098688 (LKDBHelper.m:1519)
统计到,在删除数据的时候,加锁的时候,经常卡段,除了切到子线程,有其他优化方法吗