Skip to content

lola: Performance improvements for Service/Event[Data]Control#218

Draft
bemerybmw wants to merge 9 commits intomainfrom
brem_skel_proxy_event_data_control
Draft

lola: Performance improvements for Service/Event[Data]Control#218
bemerybmw wants to merge 9 commits intomainfrom
brem_skel_proxy_event_data_control

Conversation

@bemerybmw
Copy link
Contributor

Depends-on: #211

In the "Create" case, a Skeleton will create new ServiceDataControl /
Storage objects i.e. the ServiceDataControl/Storage in the resources will
not be used. These manually created objects are only used in tests in
which we test the "Open" path (i.e. where a Skeleton opens an existing
shared memory region). Therefore, it makes more sense that these objects
are created in the specific test fixture rather than the test resources.
These Impl classes were previously added to avoid having to change
calling code to explicitly use the default template argument (i.e.
EventDataControl<>). Using the explicit template argument makes the code
more explicit and also removes the additional code complexity of having
the alias and Impl class.
This commit splits up ServiceDataControl, EventDataControl and
EventControl into a data class (ServiceDataControl, EventDataControl and
EventControl) which contains the data that is placed in shared memory
and behaviour "view" classes (ServiceDataControlLocalView,
EventDataControlLocalView and EventControlLocalView) which contain behaviour
for interacting with the data via process local raw pointers which avoid
performance overhead of interacting with data directly in shared memory
(due to performance overhead of dealing with OffsetPtrs).
Since we always create a QM EventDataControl, we pass it into the
composite by reference instead of by pointer to avoid doing nullptr
checks within the composite (and for clearer semantics).
We previously introduced these classes to avoid additional bounds
checking done when indexing into a DynamicArray in shared memory. Since
we now are using the local views into shared memory, we no longer need
this optimisation and can revert to simply accessing slots using their
indices.
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

Successfully merging this pull request may close these issues.

1 participant