libs icon indicating copy to clipboard operation
libs copied to clipboard

refactor: Use string_view in event filters and more

Open federico-sysdig opened this issue 10 months ago • 4 comments

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

federico-sysdig avatar Apr 16 '24 21:04 federico-sysdig

Since we are a bit late for the 0.16.0 tag, i propose: /milestone 0.17.0

FedeDP avatar Apr 17 '24 07:04 FedeDP

/assign @FedeDP :pray:

leogr avatar Apr 23 '24 12:04 leogr

cc @jasondellaluce

leogr avatar Apr 30 '24 16:04 leogr

LGTM label has been added.

Git tree hash: 225128f4dc00cf1a63bb56b4536a9d3039f02a77

poiana avatar May 03 '24 12:05 poiana

[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

Needs approval from an approver in each of these files:
  • ~~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

poiana avatar May 03 '24 12:05 poiana