removal of virtual tables of codecs
Closed this issue · 1 comments
Virtual inheritance is used in event-codecs to allow decoding of events correctly, when only a pointer to the base class is given. In a small number of places this is useful, but the majority of decoding can now be performed by explicitly declaring the child class. In these cases the virtual inheritance is not strictly necessary.
Declaring a class with virtual inheritance results in the virtual function table to be created which adds a few bytes of data to each class. For an AE, this doubles the memory required. In addition, when considering ports, the virtual table is interleaved in memory with the actual data making it impossible to allocate data in bulk (memory copy etc.). Instead data must be incrementally created as events are decoded, which is slightly slower.
To remove virtual inheritance would require a relatively large re-work of the library + testing. Some functions we have would not be worth upgrading so we would lose backwards compatibility with some (currently un-used) functions. Therefore such a change would constitute event-driven v2.0.