diff --git a/LKDBHelper.podspec.json b/LKDBHelper.podspec.json index fe639c9..61c68e2 100644 --- a/LKDBHelper.podspec.json +++ b/LKDBHelper.podspec.json @@ -1,6 +1,6 @@ { "name": "LKDBHelper", - "version": "2.7.1", + "version": "2.7.2", "summary": "全自动的插入,查询,更新,删除, an automatic database operation thread-safe and not afraid of recursive deadlock", "description": "全面支持 NSArray,NSDictionary, ModelClass, NSNumber, NSString, NSDate, NSData, UIColor, UIImage, CGRect, CGPoint, CGSize, NSRange, int,char,float, double, long.. 等属性的自动化操作(插入和查询)", "homepage": "https://github.com/li6185377/LKDBHelper-SQLite-ORM", @@ -10,7 +10,7 @@ }, "source": { "git": "https://github.com/li6185377/LKDBHelper-SQLite-ORM.git", - "tag": "2.7.1" + "tag": "2.7.2" }, "platforms": { "ios": "12.0", diff --git a/LKDBHelper/Helper/LKDBHelper.m b/LKDBHelper/Helper/LKDBHelper.m index c9d4b6c..8f4f078 100644 --- a/LKDBHelper/Helper/LKDBHelper.m +++ b/LKDBHelper/Helper/LKDBHelper.m @@ -364,7 +364,7 @@ - (void)runAutoVacuumAction { static dispatch_once_t onceToken; dispatch_once(&onceToken, ^{ NSString *cacheDirectory = NSSearchPathForDirectoriesInDomains(NSCachesDirectory, NSUserDomainMask, YES).firstObject; - dbAutoVaccumPath = [cacheDirectory stringByAppendingString:@"lkdb-auto-vacuum.plist"]; + dbAutoVaccumPath = [cacheDirectory stringByAppendingPathComponent:@"lkdb-auto-vacuum.plist"]; dbAutoVaccumMap = [NSMutableDictionary dictionaryWithContentsOfFile:dbAutoVaccumPath]; if (!dbAutoVaccumMap) { dbAutoVaccumMap = [NSMutableDictionary dictionary]; @@ -395,8 +395,8 @@ - (void)runAutoVacuumAction { // 无法获取到DB文件大小 return; } - // DB文件大小变化 > 10kb,才执行DB文件优化 - BOOL const needDBAction = labs(dbSize - lastSize) > 1024 * 10; + // DB文件大小变化 > 20kb,才执行DB文件优化 + BOOL const needDBAction = labs(dbSize - lastSize) > 1024 * 20; if (needDBAction) { // 执行数据分析,提高后续SQL执行效率 if (self.enableAutoAnalyze) {