libs
libs copied to clipboard
refactor: Use string_view in event filters and more
What type of PR is this? /kind cleanup
Any specific area of the project related to this PR? /area libsinsp
Does this PR require a change in the driver versions?
What this PR does / why we need it:
Some refactorings to try and improve the performance of event filtering. In particular the PR concentrates on avoiding string creation by passing around only std::string_view
objects.
Some minor improvements have been also applied, such as creating objects controlled by a shared_ptr
with std::make_shared
to ensure that the control block is not allocated separate from the object, thus avoiding one allocation and making it more cache friendly.
Which issue(s) this PR fixes: Fixes #
Special notes for your reviewer:
Does this PR introduce a user-facing change?:
NONE
Since we are a bit late for the 0.16.0 tag, i propose: /milestone 0.17.0
/assign @FedeDP :pray:
cc @jasondellaluce
LGTM label has been added.
[APPROVALNOTIFIER] This PR is APPROVED
This pull-request has been approved by: FedeDP, federico-sysdig, incertum
The full list of commands accepted by this bot can be found here.
The pull request process is described here
- ~~OWNERS~~ [FedeDP,incertum]
Approvers can indicate their approval by writing /approve
in a comment
Approvers can cancel approval by writing /approve cancel
in a comment