Network and multithreading need to pay attention to the place

Source: Internet
Author: User

1, for the single-core CPU, the threads are alternately executed, the multi-core CPU is executed concurrently.

2. Two ways to parse the data: XML and JSON.

XML Extensible Markup Language, which is a data interchange format, is generally divided into two kinds of dom and sax parsing.

Dom parsing: The entire data as a DOM object, they read into memory at once, power consumption, the resolution is low.

Sax parsing: Sax uses a stepwise analytic approach, taking up small memory, characterized by convenience, flexibility, and resolution relative trouble.

JSON is a lightweight format for data interchange, and is now the mainstream way of parsing data. The use of more.

3 use of the Open Source Library ASI

Official website: http://allseeing-i.com/asihttprequest/how-to-use

Github:https://github.com/pokeb/asi-http-request

5 library files to rely on: CFNETWORK,SYSTEMCONFIGURATION,MOBILECORESERVICES,LIBZ,LIBXML2

Network and multithreading need to pay attention to the place

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.