You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Is your feature request related to a problem? Please describe.
When reviewing the changes for other tickets, noted that the CFE ES is storing the app name in the AppTable twice. It is stored in the StartParams.Name subfield, as well as the TaskInfo.MainTaskName sub field. These appear to be always set together, to the same value, such as in CFE_ES_AppCreate for example:
The name is a string value and therefore takes a fair bit of memory to store. In the "stock" example config this bloats the size of the ES data structures by about 2500 bytes, but could easily be much more in a real deployment if OS_MAX_API_NAME is set longer and/or the max number of apps/tasks is larger.
Describe the solution you'd like
Should store at most one copy of the name in the AppTable, but even that might not be needed if it is always the same as the main task name (which it appears to be).
For tasks, OSAL already stores the task name. For the ES API calls that need to get the name, it should just lookup the name from OSAL, just like we are doing for SB in #404
Requester Info
Joseph Hickey, Vantage Systems, Inc.
The text was updated successfully, but these errors were encountered:
In fact, we don't need MainTaskName, since we have MainTaskID and it can be found by looking it up in the task table, plus the Task table has the AppName but we can also find this as the Task table has the AppId as well. So a couple cleanups will decrease the memory footprint of ES.
Is your feature request related to a problem? Please describe.
When reviewing the changes for other tickets, noted that the CFE ES is storing the app name in the
AppTable
twice. It is stored in theStartParams.Name
subfield, as well as theTaskInfo.MainTaskName
sub field. These appear to be always set together, to the same value, such as in CFE_ES_AppCreate for example:cFE/fsw/cfe-core/src/es/cfe_es_apps.c
Line 554 in 3356da6
cFE/fsw/cfe-core/src/es/cfe_es_apps.c
Line 573 in 3356da6
It then goes on to store the same string a third time in the TaskTable[x].TaskName field for the task itself:
cFE/fsw/cfe-core/src/es/cfe_es_apps.c
Lines 623 to 624 in 3356da6
The name is a string value and therefore takes a fair bit of memory to store. In the "stock" example config this bloats the size of the ES data structures by about 2500 bytes, but could easily be much more in a real deployment if OS_MAX_API_NAME is set longer and/or the max number of apps/tasks is larger.
Describe the solution you'd like
Should store at most one copy of the name in the
AppTable
, but even that might not be needed if it is always the same as the main task name (which it appears to be).For tasks, OSAL already stores the task name. For the ES API calls that need to get the name, it should just lookup the name from OSAL, just like we are doing for SB in #404
Requester Info
Joseph Hickey, Vantage Systems, Inc.
The text was updated successfully, but these errors were encountered: