Suggestions for code optimization
-
- Posts: 5
- http://meble-kuchenne.info.pl
- Joined: Sun Jun 16, 2024 4:32 am
Suggestions for code optimization
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.
-
- 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
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?
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?
Regards Ben Rowland - MatrixTSL
Flowcode Online Code Viewer (Beta) - Flowcode Product Page - Flowcode Help Wiki - My YouTube Channel
Flowcode Online Code Viewer (Beta) - Flowcode Product Page - Flowcode Help Wiki - My YouTube Channel