Ftk memory usage and Optimization

Source: Internet
Author: User

Ftk memory usage and Optimization

1. Font

Ftk
The size of the built-in font file is 4519756 bytes. If the system supports MMAP or norflash, this will not be a big problem, otherwise it will all be read into the memory, obviously this is unknown
Smart. Fortunately, we usually do not need to display all characters, but only need several hundred or even dozens of characters. In this case, we can use tools/fontextract to regenerate the font file.
The font file will be very small.

2. Input Method Data

The input data is also very large. If the system supports MMAP or norflash, this will not be a big problem. Otherwise, it will be a little troublesome. The solutions include:

* Simplified input data

* Rewrite the search algorithm.

* Use commercial input methods

* You can directly remove the input method without any need.

3. pai_canvas

Canvas is the canvas for drawing Widgets. The entire system only needs one canvas, which is independent of the number of windows. It occupies 4 * display_width * display_height memory. This cannot be reduced.

4. Subject

The topic contains some icons. These icons are not large. After decoding, they occupy about K in the memory. Because they are decoded on demand, they are rarely decoded.

5. ftk Library

About 300 K

6. Others

Other dynamically allocated memory, mainly used by various widgets, usually no more than 200 kb.

After some streamlining, the memory used by the ftk should be reduced to about 2 MB.

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.