Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Prune initialState files & amount of data saved with each design #856

Open
grumpyinca opened this issue Oct 3, 2023 · 2 comments
Open
Assignees
Milestone

Comments

@grumpyinca
Copy link
Contributor

It appears that there are opportunities to size-reduce initialState files as well as the amount of data saved with each design. Reducing the size of designs saved into the production database can slow the growth of the database and thus push off the time when it will be necessary to move to a more expensive tier of database hosting.

The most obvious first move is to not store the values of dependent variables. These values are unnecessary because on opening a design from the database, the values of all dependent variables are immediately recalculated from the current independent variables and calculation inputs. The process of saving a design will need to set values of each dependent variable to something short. Perhaps a null string ('') will work best. This would be preferable to the value appearing as "null" or "undefined". While a bit of investigation may be required to confirm, perhaps the values of smin / smax can be treated the same way.

It may also be possible to avoid repeating the tooltip associated with each symbol table entry. It is likely that there are multiple approaches. Perhaps a new database table can contain a list of strings. The stored value of tooltip could be the index into this list.

@grumpyinca grumpyinca added this to the ODOP 5.0 milestone Oct 3, 2023
@grumpyinca
Copy link
Contributor Author

grumpyinca commented Oct 17, 2023

This issue overlaps with #816 (now closed):

Calculation Input members of the symbol table (initialState, Startup designs) for the various Spring design types contain unused property entries, for example: lmin, lmax, cmin, cmax, sdlim. These entries contribute to unnecessary data size and are a potential source of confusion. These entries should be removed.

@grumpyinca
Copy link
Contributor Author

grumpyinca commented Dec 25, 2023

Today's discussion came up with a perhaps better approach. Specifically, the existing initialState files can be thought of as a "template" that contains all information about a design. When exporting or saving into the database, only the information that is potentially changed by user input and not re-generated should go out. When coming back, that information can be merged with the appropriate initialState in order to re-create the desired instance of the model.

Having less information stored in the database and Export files means that a specific design has a smaller "footprint" that is exposed to version change ... thus potentially less migration required. The information that is not subject to change as a result of user input will move forward as the initialState (template) moves forward from version to version.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants