小牛很生气我的应用程序有太多"空闲唤醒".我知道这与计时器和OS X尝试使我的应用程序更节能的方式有关.如何调试这些空闲唤醒?或者可能的原因是什么?
我有一个托管对象上下文,我添加了两个不同的SQLite存储.我使用Mananged Object Model中的Configurations将某些实体分配给一个商店,将其他实体分配给另一个实体.配置称为"UserDB"和"MainDB".
一切正常,直到我尝试使用自动迁移.在创建新的托管对象模型版本并向UserDB配置中的一个实体添加新属性后,在将旧版本存储(对于UserDB相关的存储)添加到商店协调器时,我得到一个例外:'模型不包含配置'UserDB'.' 我在Google上找不到此错误的匹配.有人在那里使用配置多个商店?任何人都知道我可能做错了什么?
堆栈看起来像这样:
objc_exception_throw
-[NSManagedObjectModel isConfiguration:compatibleWithStoreMetadata:]
-[NSStoreMigrationPolicy sourceModelForStoreAtURL:metadata:error:]
-[NSStoreMigrationPolicy(InternalMethods) _gatherDataAndPerformMigration:]
-[NSPersistentStoreCoordinator addPersistentStoreWithType:configuration:URL:options:error:]
-[MyAppDelegate persistentStoreCoordinator]
Run Code Online (Sandbox Code Playgroud) 当尝试调试某些CoreImage渲染为何会显着增加CPU使用率时,我可以在示例跟踪中看到,当我以某些方式裁剪和合成图像时,CoreImage正在执行memcpys。当我取出作物过滤器时,它消失了。我将其用于实时2D视频管道,所以这不好。
我所有的图像都在GPU上,因此我对其在CPU上复制的内容感到困惑。
任何人都有任何想法可能会做什么?
+ ! 457 -[CIContext render:toCVPixelBuffer:bounds:colorSpace:] (in CoreImage) + 1296 [0x7fff8db01111]
+ ! 457 -[CIContext render:toIOSurface:bounds:colorSpace:] (in CoreImage) + 1907 [0x7fff8db030e5]
+ ! 455 CI::image_render_to_surface(CI::Context*, CI::Image*, CGRect, CGColorSpace*, __IOSurface*, CGPoint, CI::PixelFormat) (in CoreImage) + 1862 [0x7fff8db1d8a9]
+ ! : 451 CI::_image_render(char const*, CI::Context*, CI::Image*, CGRect, CGColorSpace*, CI::PixelFormat, unsigned long, CGPoint const&, CI::swizzle_info const&) (in CoreImage) + 869 [0x7fff8db1cdda]
+ ! : | 443 CI::tile_node_graph(CI::Context*, char const*, CI::Node*, CGRect const&, CI::PixelFormat, CI::swizzle_info const&, void (CI::Node*, CGRect) block_pointer) (in CoreImage) …Run Code Online (Sandbox Code Playgroud)