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.