Hi Simperium Developers。
我正在使用您的数据平台构建一个iOS应用程序,因为我更深入地进行最终测试我看到了这个问题,因为coredata的数量增加了应用程序“冻结”,因为它是更新。
当使用我的iPad版应用程序的用户移动到另一台设备并且他们第一次将大型数据集同步到新设备时,问题非常明显,但我也看到了类似的小变化行为
所以我在Log
中看到以下内容Simperium将253个对象请求(PeopleModel)排入队列
Simperium排队301个对象请求(SeatsModel)
Simperium将139个对象请求排入队列(KeywordModel)
等
我总共有大约20个实体
然后应用程序似乎挂起用户界面,直到我看到
Simperium完成了PeopleModel的处理索引
Simperium完成了SeatsModel的处理索引
Simperium完成了KeywordModel的处理索引
排队和finsheed处理消息之间可能有很多分钟的等待。
如果我打开详细日志记录,我只会在每个对象入队时看到其他信息 - 没有错误或警告......
我的iOS应用程序中是否可以执行/更改以释放应用程序的其余部分以继续处理...?
帮助!
干杯
史蒂夫
嗨,迈克,
感谢快速回复,添加useWebsockets似乎会让事情变得更好。在较小的更新它肯定有帮助。但是当我进行主同步时(即用户正在同步云中存在的数据集的情况,例如当他们链接新设备并且数据已经存在时),我看到相同的“冻结”行为,然后我收到这个CRASH:
Simperium websocket失败,错误错误Domain = org.lolrus.SocketRocket Code = 2145“写入流时出错”UserInfo = 0x28b85f60 {NSLocalizedDescription =写入流错误} 2013-05-13 19:29:56.898 MeetingPad [652:907] * - [SRWebSocket发送:]:发送到解除分配的实例0x1d172bc0的消息
我尝试了3次测试,但我没有看到上面的websocket错误......所以可能不相关。
我的coredata大小约为2.4MB - 这是完整的控制台输出,任何更多的想法将不胜感激....我很乐意向用户弹出一条消息,简单地说“同步请等待”但我'我不确定如何知道同步何时完成以删除消息.....
2013-05-13 20:09:37.367 MeetingPad[897:907] Init DropBox
2013-05-13 20:09:37.575 MeetingPad[897:907] Init MPIAPHelper
2013-05-13 20:09:37.588 MeetingPad[897:1803] NETWORK REACHABLE!
2013-05-13 20:09:37.676 MeetingPad[897:907] Simperium error: bucket list not loaded. Ensure Simperium is started before any objects are fetched.
2013-05-13 20:09:37.702 MeetingPad[897:907] Simperium error: bucket list not loaded. Ensure Simperium is started before any objects are fetched.
2013-05-13 20:09:37:928 MeetingPad[897:907] Simperium didn't find an existing auth token
2013-05-13 20:09:37:956 MeetingPad[897:907] Simperium starting...
2013-05-13 20:09:37:960 MeetingPad[897:907] Simperium loaded 21 entity definitions
2013-05-13 20:09:37.977 MeetingPad[897:907] Simperium managing 0 ActionLinks82 object instances
2013-05-13 20:09:38.000 MeetingPad[897:907] Simperium managing 1 Relationship1Model82 object instances
2013-05-13 20:09:38.004 MeetingPad[897:907] Simperium managing 0 AttendeeModel82 object instances
2013-05-13 20:09:38.010 MeetingPad[897:907] Simperium managing 0 ClipModel82 object instances
2013-05-13 20:09:38.015 MeetingPad[897:907] Simperium managing 0 ShapesModel82 object instances
2013-05-13 20:09:38.020 MeetingPad[897:907] Simperium managing 0 SeatModel82 object instances
2013-05-13 20:09:38.026 MeetingPad[897:907] Simperium managing 0 AgendaItemModel82 object instances
2013-05-13 20:09:38.031 MeetingPad[897:907] Simperium managing 0 PointsModel82 object instances
2013-05-13 20:09:38.036 MeetingPad[897:907] Simperium managing 0 AgendaItemVersionModel82 object instances
2013-05-13 20:09:38.040 MeetingPad[897:907] Simperium managing 0 Relationship2Model82 object instances
2013-05-13 20:09:38.044 MeetingPad[897:907] Simperium managing 0 ImagesModel82 object instances
2013-05-13 20:09:38.054 MeetingPad[897:907] Simperium managing 1 SeatingPlanModel82 object instances
2013-05-13 20:09:38.075 MeetingPad[897:907] Simperium managing 0 NoteLink82 object instances
2013-05-13 20:09:38.080 MeetingPad[897:907] Simperium managing 0 RecordingModel82 object instances
2013-05-13 20:09:38.085 MeetingPad[897:907] Simperium managing 0 ActionsModel82 object instances
2013-05-13 20:09:38.089 MeetingPad[897:907] Simperium managing 0 KeywordLinks82 object instances
2013-05-13 20:09:38.093 MeetingPad[897:907] Simperium managing 0 PeopleLinks82 object instances
2013-05-13 20:09:38.098 MeetingPad[897:907] Simperium managing 0 EvernoteDeletions82 object instances
2013-05-13 20:09:38.105 MeetingPad[897:907] Simperium managing 6 StylesModel82 object instances
2013-05-13 20:09:38.107 MeetingPad[897:907] Simperium managing 1 NotesModel82 object instances
2013-05-13 20:09:38.111 MeetingPad[897:907] Simperium managing 0 PeopleModel82 object instances
2013-05-13 20:09:38:116 MeetingPad[897:907] Simperium didn't find an existing auth token
2013-05-13 20:09:54:931 MeetingPad[897:907] Simperium authenticating: https://auth.simperium.com/1/wqqewweqeqw-disabeqweqwilities-33we2/authorize/
2013-05-13 20:09:56:010 MeetingPad[897:907] Simperium authentication success!
2013-05-13 20:09:56.150 MeetingPad[897:907] Reachability Flag Status: -R ------- networkStatusForFlags
2013-05-13 20:09:56:151 MeetingPad[897:907] Simperium starting network managers...
2013-05-13 20:09:56.151 MeetingPad[897:907] Opening Connection...
2013-05-13 20:09:57:855 MeetingPad[897:907] Simperium processing 106 objects from index (ClipModel82)
2013-05-13 20:09:57:878 MeetingPad[897:907] Simperium enqueuing 106 object requests (ClipModel82)
2013-05-13 20:09:58:069 MeetingPad[897:907] Simperium processing 290 objects from index (AttendeeModel82)
2013-05-13 20:09:58:124 MeetingPad[897:907] Simperium enqueuing 290 object requests (AttendeeModel82)
2013-05-13 20:09:58:173 MeetingPad[897:907] Simperium processing 223 objects from index (ShapesModel82)
2013-05-13 20:09:58:175 MeetingPad[897:907] Simperium processing 28 objects from index (ImagesModel82)
2013-05-13 20:09:58:176 MeetingPad[897:907] Simperium processing 47 objects from index (Relationship2Model82)
2013-05-13 20:09:58:196 MeetingPad[897:907] Simperium enqueuing 47 object requests (Relationship2Model82)
2013-05-13 20:09:58:205 MeetingPad[897:907] Simperium enqueuing 28 object requests (ImagesModel82)
2013-05-13 20:09:58:232 MeetingPad[897:907] Simperium processing 100 objects from index (Relationship1Model82)
2013-05-13 20:09:58:234 MeetingPad[897:907] Simperium enqueuing 223 object requests (ShapesModel82)
2013-05-13 20:09:58:256 MeetingPad[897:907] Simperium enqueuing 100 object requests (Relationship1Model82)
2013-05-13 20:09:58:276 MeetingPad[897:907] Simperium processing 250 objects from index (ActionLinks82)
2013-05-13 20:09:58:322 MeetingPad[897:907] Simperium processing 251 objects from index (SeatingPlanModel82)
2013-05-13 20:09:58:348 MeetingPad[897:907] Simperium enqueuing 250 object requests (ActionLinks82)
2013-05-13 20:09:58:378 MeetingPad[897:907] Simperium enqueuing 251 object requests (SeatingPlanModel82)
2013-05-13 20:09:58:383 MeetingPad[897:907] Simperium processing 155 objects from index (RecordingModel82)
2013-05-13 20:09:58:412 MeetingPad[897:907] Simperium enqueuing 155 object requests (RecordingModel82)
2013-05-13 20:09:58:442 MeetingPad[897:907] Simperium processing 24 objects from index (StylesModel82)
2013-05-13 20:09:58:449 MeetingPad[897:907] Simperium enqueuing 24 object requests (StylesModel82)
2013-05-13 20:09:58:471 MeetingPad[897:907] Simperium processing 232 objects from index (NoteLink82)
2013-05-13 20:09:58:482 MeetingPad[897:907] Simperium processing 289 objects from index (ActionsModel82)
2013-05-13 20:09:58:486 MeetingPad[897:907] Simperium processing 248 objects from index (NotesModel82)
2013-05-13 20:09:58:500 MeetingPad[897:907] Simperium processing 295 objects from index (PeopleLinks82)
2013-05-13 20:09:58:593 MeetingPad[897:907] Simperium enqueuing 232 object requests (NoteLink82)
2013-05-13 20:09:58:655 MeetingPad[897:907] Simperium enqueuing 248 object requests (NotesModel82)
2013-05-13 20:09:58:686 MeetingPad[897:907] Simperium enqueuing 295 object requests (PeopleLinks82)
2013-05-13 20:09:58:696 MeetingPad[897:907] Simperium enqueuing 289 object requests (ActionsModel82)
2013-05-13 20:09:59:987 MeetingPad[897:907] Simperium processing 481 objects from index (PointsModel82)
2013-05-13 20:10:00:073 MeetingPad[897:907] Simperium processing 275 objects from index (SeatModel82)
2013-05-13 20:10:00:080 MeetingPad[897:907] Simperium processing 267 objects from index (KeywordLinks82)
2013-05-13 20:10:00:088 MeetingPad[897:907] Simperium processing 220 objects from index (PeopleModel82)
2013-05-13 20:10:00:092 MeetingPad[897:907] Simperium enqueuing 481 object requests (PointsModel82)
2013-05-13 20:10:00:450 MeetingPad[897:907] Simperium enqueuing 220 object requests (PeopleModel82)
2013-05-13 20:10:00:461 MeetingPad[897:907] Simperium enqueuing 267 object requests (KeywordLinks82)
2013-05-13 20:10:00:461 MeetingPad[897:907] Simperium enqueuing 275 object requests (SeatModel82)
2013-05-13 20:13:29.671 MeetingPad[897:907] Opening Connection...
2013-05-13 20:13:30:598 MeetingPad[897:907] Simperium processing 100 objects from index (Relationship1Model82)
2013-05-13 20:13:30:706 MeetingPad[897:907] Simperium processing 250 objects from index (ActionLinks82)
2013-05-13 20:13:30:743 MeetingPad[897:907] Simperium processing 290 objects from index (AttendeeModel82)
2013-05-13 20:13:30:804 MeetingPad[897:907] Simperium processing 106 objects from index (ClipModel82)
2013-05-13 20:13:30:806 MeetingPad[897:907] Simperium processing 47 objects from index (Relationship2Model82)
2013-05-13 20:13:30:846 MeetingPad[897:907] Simperium processing 275 objects from index (SeatModel82)
2013-05-13 20:13:30:858 MeetingPad[897:907] Simperium processing 28 objects from index (ImagesModel82)
2013-05-13 20:13:30:870 MeetingPad[897:907] Simperium processing 155 objects from index (RecordingModel82)
2013-05-13 20:13:30:948 MeetingPad[897:907] Simperium processing 223 objects from index (ShapesModel82)
2013-05-13 20:13:30:955 MeetingPad[897:907] Simperium processing 267 objects from index (KeywordLinks82)
2013-05-13 20:13:30:977 MeetingPad[897:907] Simperium processing 481 objects from index (PointsModel82)
2013-05-13 20:13:31:011 MeetingPad[897:907] Simperium processing 232 objects from index (NoteLink82)
2013-05-13 20:13:31:053 MeetingPad[897:907] Simperium processing 289 objects from index (ActionsModel82)
2013-05-13 20:13:31:062 MeetingPad[897:907] Simperium processing 295 objects from index (PeopleLinks82)
2013-05-13 20:13:31:076 MeetingPad[897:907] Simperium processing 24 objects from index (StylesModel82)
2013-05-13 20:13:31:338 MeetingPad[897:907] Simperium processing 220 objects from index (PeopleModel82)
2013-05-13 20:14:34.901 MeetingPad[897:907] Opening Connection...
答案 0 :(得分:1)
您在大量存储桶中同步的大量数据暴露了一些性能问题。已使用this commit修正了这些内容。
特别是:
NSNotifications
在索引时非常积极地触发添加/更改的对象。由于大多数人似乎都没有使用这些(在索引期间),它们现在已被删除。当添加/更改对象时,它们仍然会被触发。
跟踪待处理关系的元数据存储已直接从NSUserDefaults
移至NSPersistentStore
上的元数据。
挂起关系的解析已移至其自己的GCD队列,因为它在索引期间可能非常频繁地触及数据库。