iPhone 上什么速度更快? XML pList 还是 JSON?
假设 XML plist 和 JSON 都是通过 http、gzip 传输的,哪一个在 iPhone 上处理得更快?
Assuming both XML plist and JSON are delivered over http, gzipped, which one will be processed faster on an iPhone?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(4)
我和一位同事最近做了一些基本的基准测试,以测试对于我们正在编写的应用程序来说哪个更快。我们测试了此 JSON 框架、NSXML 解析器以及 TreeNode我们在一本 Objective-C 书中找到了解析器。以下是我发送给我们团队中其他开发人员的说明:
A co-worker and I did some rudimentary benchmarks recently to test which was faster for an application we were writing. We tested this JSON framework, and the NSXML parser as well as a TreeNode parser we found in an Objective-C book. Here is the note I sent to the other developers on our team:
JSON 击败 plists 的依据如下:
http://samsoff.es/posts/web-services-with-cocoa-惊喜
JSON beats plists according to this:
http://samsoff.es/posts/web-services-with-cocoa-surprise
这取决于传递的数据及其解析方式,但它们的速度应该相似。您应该只选择一个更容易开发解析器的解析器,然后对解析器进行微调。
It depends on the data that is delivered and the way it is parsed, but they should both be similar in speed. You should just choose the one that is easier for you to develop a parser and then fine tune the parser.
在 WwDC 的“构建服务器驱动的用户体验”会议上,一位 Apple 开发人员表示 PLIST 因其速度更快、更易于使用而受到青睐。
In the "Building a Server-Driven User Experience" session of WwDC, an Apple developer stated that PLIST was preferred for being faster and easier to use.