1. A computer-implemented method performed by a processor comprising: identifying a plurality of variable-sized signals in a first graphical model, the plurality of variable-sized signals changing size during execution of the first graphical model; processing the first graphical model to identify at least two variable-sized signals from the plurality of variable-sized signals, where the identified signals are of a same size during model execution, wherein the processing comprises: identifying that a dimension of an output signal is changed by an owner entity of the output signal, performing size-propagation, the size-propagation comprising: traversing at least a portion of the model in the forward direction to identify the owner entity of the output signal, and if dimension information of the output signal is not determined by traversing the portion of the model in the forward direction, traversing at least a portion of the model in the backward direction; and grouping the identified signals, where: the grouping is based at least in part on the processing and an ownership of the identified signals, and the grouping allows the identified signals to share a size-vector; automatically generating code from the first graphical model, the generated code comprising: code representing at least part of the first graphical model such that one size-vector in the generated code represents the at least two grouped variable-sized signals having the same size during the model execution, where the size-vector in the generated code stores values representing a size of the at least two grouped variable-sized signals of the first graphical model; and code for updating one or more values stored in the size-vector during the model execution such that the one or more values stored in the size-vector represent a size of the at least two grouped variable-sized signals during the model execution.