1

嗨 Simperium 开发人员。

我正在使用您的数据平台构建一个 iOS 应用程序,随着我深入进行最终测试,我看到了这个问题,因为 coredata 的数量增加了应用程序在更新时“冻结”。

当一直在使用我的 iPad 版本应用程序的用户移动到另一台设备并且他们第一次将大型数据集同步到新设备时,这个问题非常明显,但我也看到小的更改也有类似的行为。

所以我在日志中看到以下内容

Simperium 排队 253 个对象请求 (PeopleModel)

Simperium 排队 301 对象请求 (SeatsModel)

Simperium 将 139 个对象请求排队(KeywordModel)

等等

我总共有大约 20 个实体

然后应用程序似乎挂起用户界面,直到我看到

PeopleModel 的 Simperium 完成处理指标

SeatsModel 的 Simperium 成品加工指数

Simperium 完成的 KeywordModel 处理索引

在排队和完成处理消息之间可能有很多分钟的等待。

如果我打开详细日志记录,我只会在每个对象排队时看到其他信息 - 没有错误或警告......

我可以在我的 iOS 应用程序中做些什么/更改以释放应用程序的其余部分以继续处理......?

帮助 !

干杯

史蒂夫

嗨迈克,

感谢您的快速回复,添加 useWebsockets 似乎会使事情变得更好。在较小的更新上,它肯定有帮助。但是当我进行主同步时(即用户正在同步云中已经存在的数据集的场景,例如当他们链接新设备并且数据已经存在时)我看到相同的“冻结”行为,然后我收到此崩溃:

Simperium websocket 失败并出现错误错误域 = org.lolrus.SocketRocket 代码 = 2145 “写入流时出错” UserInfo = 0x28b85f60 {NSLocalizedDescription = 写入流时出错} 2013-05-13 19:29:56.898 MeetingPad[652:907] * -[SRWebSocket send:]:消息发送到已释放实例 0x1d172bc0

我又尝试了 3 次测试,但我没有再次看到上面的 websocket 错误......所以可能不相关。

我的核心数据大小约为 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...
4

1 回答 1

1

您在大量存储桶中同步的大量数据暴露了一些性能问题。这些已通过此提交修复。

尤其是:

  1. NSNotifications索引时非常积极地触发了添加/更改的对象。由于大多数人似乎无论如何都没有使用这些(在索引期间),因此它们现在已被删除。当添加/更改对象时,它们仍然会被触发。

  2. 跟踪待处理关系的元数据存储已NSUserDefaults直接从NSPersistentStore.

  3. 待处理关系的解析已移至其自己的 GCD 队列,因为它在索引期间可能非常频繁地接触数据库。

于 2013-05-21T22:38:06.707 回答