lola: Performance improvements for Service/Event[Data]Control#218
Draft
lola: Performance improvements for Service/Event[Data]Control#218
Conversation
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.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Depends-on: #211