Dsn and project optimization tips to optimize your workflow and project size

In the embedded GUI world, size matters. Here are several project optimization tips that generally help for any project in order to reduce code size and complexity of your model, while increasing efficiency as well:

1) To optimize fonts/font data, please see this KB video:

2) Build the GUI with "common layouts" in mind. That is, if any screen uses the same-looking objects as another screen, ensure those 2 screens actually use the same common set of objects, vs. copying/pasting any objects elsewhere. While this puts the burden on the C code to create multiple "screens" by sending different data/events/strings to the same set of identical objects using the single common layout, it is overall much more efficient, and keeps the code size smaller. Common layouts also make the dsn for the project much simpler/smaller, which makes making changes/updates far more manageable both now, and in the future if you come back to the project are no longer as familiar with it at that point.

3) If using a file system, ensure any Image object that is pointing to the same png file as another Image object shares the _image_name animation.

4) Use large images sparingly, and break up big background images into small "strips" or "slices" of the whole image, and then repeat that smaller image with multiple Image objects as needed until you achieve the width desired.

5) For any image-sequence based animation, ensure only the parts of the images that are in fact "changing/moving" are part of the image sequence. Static/non-moving parts should be a single BG Image object behind the the image sequence animation. Also, instead of having tons of images, try making a deck that only uses every third or every fifth image, and have the code play back the cards/"frames" more rapidly, so it still appears smooth.

6) For any image file that looks the same as another, only use 1 of the images. For example, don't have 2 icons with the same image content named section1_icon1.png and section2_icon1.png if the image content is the same.

Have more questions? Submit a request


Please sign in to leave a comment.