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

It's time to make struct ndpi_flow_struct small again #2631

Open
IvanNardi opened this issue Nov 26, 2024 · 3 comments
Open

It's time to make struct ndpi_flow_struct small again #2631

IvanNardi opened this issue Nov 26, 2024 · 3 comments

Comments

@IvanNardi
Copy link
Collaborator

On Jan 30, 2022 (see 5bb5bec)

nDPI Memory statistics:
	Flow Memory (per flow):  688 B 

Now

nDPI Memory statistics:
	Flow Memory (per flow):  1.16 KB 
@0xA50C1A1
Copy link
Contributor

Is it possible to move protocol-specific stuff out of struct ndpi_flow_struct into something else and leave something like void* protocol_data pointing to a protocol-specific stuff? Well, I dunno, probably it's not the best solution.

@utoni
Copy link
Collaborator

utoni commented Dec 2, 2024

IMHO most of the L7 protocol stuff is already a union.

@utoni
Copy link
Collaborator

utoni commented Dec 3, 2024

It could be worth checking if the struct members especially arrays could be reduced or removed i.e. host_server_name requires 80 bytes per flow, but from my experience, I think that that the array size is a waste of memory most of the times.

@IvanNardi IvanNardi mentioned this issue Dec 18, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants