# Program memory optimization best practices

**URL:** <https://forum.xod.io/t/program-memory-optimization-best-practices/6111>\
**Category:** XOD Programming Questions\
**Created:** [June 10, 2022, 12:51pm UTC](https://forum.xod.io/t/program-memory-optimization-best-practices/6111 "2022-06-10T12:51:53Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![leventesen](https://avatars.discourse-cdn.com/v4/letter/l/87869e/32.png) [@leventesen](https://forum.xod.io/u/leventesen)\
**Post date:** [June 10, 2022, 12:51pm UTC](https://forum.xod.io/t/program-memory-optimization-best-practices/6111/1 "2022-06-10T12:51:53Z")

</div>

Hi everyone,

What should be done to reduce the program size, is there a best practices doc?

---

<div class="post-metadata">

**Author:** ![gweimer](https://avatars.discourse-cdn.com/v4/letter/g/a9adbd/32.png) [@gweimer](https://forum.xod.io/u/gweimer)\
**Post date:** [June 10, 2022, 1:40pm UTC](https://forum.xod.io/t/program-memory-optimization-best-practices/6111/2 "2022-06-10T13:40:45Z")

</div>

Someone might be able to provide more details, but I don’t think a best-practices exists for limiting memory usage in XOD.

The primary advice I can give is to avoid using strings as much as possible. There was also a XOD node that unexpectedly uses quite a bit of memory…I think it was the ‘select’ node…

Unfortunately, one of the trade-offs of a higher-level language like XOD that abstracts out the low-level details is that it is not likely to be optimized for speed or memory. You get generic building blocks that cover many cases rather than an optimized solution for any specific problem.

---

<div class="post-metadata">

**Author:** ![leventesen](https://avatars.discourse-cdn.com/v4/letter/l/87869e/32.png) [@leventesen](https://forum.xod.io/u/leventesen)\
**Post date:** [June 13, 2022, 5:55am UTC](https://forum.xod.io/t/program-memory-optimization-best-practices/6111/3 "2022-06-13T05:55:08Z")

</div>

Thanks for your advice, I will apply it.

---

<div class="post-metadata">

**Author:** ![system](https://canada1.discourse-cdn.com/flex027/uploads/xod/original/1X/eb7348baa04192c2ef932d1db54d44f09f8a7888.png) [@system](https://forum.xod.io/u/system)\
**Post date:** [July 13, 2022, 5:55am UTC](https://forum.xod.io/t/program-memory-optimization-best-practices/6111/4 "2022-07-13T05:55:38Z")

</div>

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.
