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

Icinga DB Boost.Signal2 handlers: reduce malloc(3) #10276

Open
Al2Klimov opened this issue Dec 20, 2024 · 0 comments
Open

Icinga DB Boost.Signal2 handlers: reduce malloc(3) #10276

Al2Klimov opened this issue Dec 20, 2024 · 0 comments
Labels
core/quality Improve code, libraries, algorithms, inline docs ref/NC

Comments

@Al2Klimov
Copy link
Member

Is your feature request related to a problem? Please describe.

Icinga DB Boost.Signal2 handlers, which btw block its callers on every cluster message, assemble malloc(3)-heavy String[]s and then pass them to the I/O loop via fire and forget.

Describe the solution you'd like

Replace String[] with T[] where T is a union/variant of String|const char*. The latter would re-use constant C string literals (as in "icinga:foobar") compiled in the program every time.

Describe alternatives you've considered

Handlers just collect all data needed for a message and put a callback in a workqueue (but maybe not directly the I/O loop itself).

Additional context

ref/NC/820479

@Al2Klimov Al2Klimov added core/quality Improve code, libraries, algorithms, inline docs ref/NC labels Dec 20, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
core/quality Improve code, libraries, algorithms, inline docs ref/NC
Projects
None yet
Development

No branches or pull requests

1 participant