Suggestions for code optimization

For general Flowcode discussion that does not belong in the other sections.
Post Reply
missman
Posts: 5
http://meble-kuchenne.info.pl
Joined: Sun Jun 16, 2024 4:32 am

Flowcode v10 Suggestions for code optimization

Post by missman »

In the process of using flowcode, when converting the flow graph into C code, it is found that the code of the same component is repeated seriously. I suggest whether the code can be converted by component instantiation. For example, if I add two can communication components, the code will actually only encapsulate a can structure and function, and when adding multiple components, just define multiple structure variables to avoid too much code repetition. Hopefully it will be adopted and improved in the next release. Personal advice, for reference.

BenR
Matrix Staff
Posts: 1912
Joined: Mon Dec 07, 2020 10:06 am
Has thanked: 496 times
Been thanked: 674 times

Re: Suggestions for code optimization

Post by BenR »

Hello,

Thansk for your suggestions. It's sometimes not that simple as you never know what component is used where. e.g. if you are talking to one and then talking to another instance via an interrupt then there can be a clash and here two instances of the code would be a better approach. Another downside is the additional overhead it would add to allow one instance to control several instances variables will in a lot of cases add more bloat then the current method.

Which components specifically are you looking at and we can see if there are any optimisations that can be made?

Post Reply