Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

htp/table: only fetch element when needed #434

Merged
merged 1 commit into from
Sep 20, 2024

Conversation

inashivb
Copy link
Member

Previous PR: #432

Changes since v3:

  • rebased on top of latest 0.5.x branch

It is unnecessary to always fetch the element as it is only needed when
there is a match. Get the list item only when the key candidate matches
the key parameter and the element needs to be returned. This will ensure
lesser calls to htp_list_get fn.
@suricata-qa
Copy link

Information: QA ran without warnings.

Pipeline 22122

@catenacyber
Copy link
Contributor

Do you have some benchmark ?

The patch looks ok, but I am not sure it matters much...

@inashivb
Copy link
Member Author

Do you have some benchmark ?

The patch looks ok, but I am not sure it matters much...

No benchmarks w me. Feel free to reject it if it looks like noise. :)

Copy link
Member

@victorjulien victorjulien left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks more efficient, so lets merge this.

@victorjulien victorjulien merged commit 09d8110 into OISF:0.5.x Sep 20, 2024
10 checks passed
@victorjulien
Copy link
Member

Merged in #435, thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

4 participants