IM application optimization and IM application optimization

Source: Internet
Author: User

IM application optimization and IM application optimization


I have considered some application optimization issues in IM applications.


The optimization focuses on Power Optimization and traffic optimization:


How to test power consumption by optimizing Power Consumption (front-end power consumption and back-end power consumption)

1. dedicated devices

2. Performance-related apps

3. Manually write Power Consumption


Power Optimization

1. Do not affect sleep of mobile phones

Heartbeat packet starting from alarm manager


2. Minimize network requests

Data cache, local storage, synchronous incremental, send multiple requests at a time


3. Less GPS positioning, Network Positioning preferred


4. Optimize different network types

The download speed of the mobile network is higher than the upload speed; the data packet sent at a time of 2 GB is not too large; the 3G4G 4G sends multiple data packets at a time, which saves power.

Upload buffer size: 2G 1024 bytes, 3G 10 k

Download buffer size: 2G 1024 bytes, 3G 30 K


For other optimizations, refer to the official website.



How to test traffic Optimization

Uid = Process. myUid ();

InitRecvBytes = TrafficStats. GetUidRxBytes (uid );

InitSendBytes = TrafficStats. GetUidTxBytes (uid );


Traffic Optimization

1. heartbeat

Reduce heartbeat Packet

Reduce sending frequency

Intelligent heartbeat and dynamic heartbeat time


2. Packet Protocol

Customize the packet Protocol to reduce the packet size.


3. Abnormal reconnection Mechanism

Dynamic reconnection Mechanism


4. Compression

File compression

Used compression algorithm: gzip



Message Optimization

Every important message must be returned to the server.








Why is the quality of GIF images I made with PS reduced a lot after I optimized the storage in Im?

Images have many color modes: RGB, CMYK, WEB, and GIF ............
RGB color range: R: 0-255G: 0-255 B: 0-255
CMYK color range: C: 0-100 M: 0-100 Y: 0-100 K: 0-100
GIG color range: 0-256. A maximum of 256 colors are supported.
If you convert an RGB image into a GIF image, many colors will be lost. The GIF memory is also the smallest, because it is a popular animation color mode on the Internet.

Application of Optimization Theory in Engineering Management

Are you writing a thesis...
Optimization Theory is a theory in management science. You should have heard of this theory, which is called the "multi-party improvement" and "multi-party optimization ".
In engineering management, the most simple application of optimization theory is the control of construction progress in construction organization.
That is, the optimal or fastest construction organization arrangement is sought through the management of operational research methods in the Network Diagram and bar chart settings.

Related Article

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.