-
Notifications
You must be signed in to change notification settings - Fork 63
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
Use hasmap to find comment data #374 #375
Conversation
Now there is a |
Tbh, I'm not sure if I understand whats happening with How ever, by removing naemon-core/src/naemon/shared.c Lines 416 to 437 in 4700219
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
looks good
could you please rebase this PR on the latest HEAD. This should also trigger the checks again. |
Signed-off-by: nook24 <[email protected]>
i just rebased this and had another look. It wont't work like this because the comment_list has only next pointer but no prev. So there is no way to remove something in the middle without walking along all the comment_list again. |
This PR reworks the comment handling to improve performance when having lots of comments. - it add a prev pointer to the comments list so we don't have to iterate over the complete list when removing an item - it replaces the hash lookup to quickly access comments for specific hosts/services in favor of a new host/service attribute which holds links to the comments - it avoids duplicate host/service lookups for DEL_ALL_HOST_COMMENTS/DEL_ALL_SVC_COMMENTS command - it removes hash functions which are now unused In general, it tries to adopt the downtime handling over to comments. This PR is based on naemon#375. Since the internal object structure changes, all NEB modules have to be rebuild. (We therefor increase CURRENT_NEB_API_VERSION to 6) Signed-off-by: Sven Nierlein <[email protected]>
i made some changes and created #420 |
This PR reworks the comment handling to improve performance when having lots of comments. - it add a prev pointer to the comments list so we don't have to iterate over the complete list when removing an item - it replaces the hash lookup to quickly access comments for specific hosts/services in favor of a new host/service attribute which holds links to the comments - it avoids duplicate host/service lookups for DEL_ALL_HOST_COMMENTS/DEL_ALL_SVC_COMMENTS command - it removes hash functions which are now unused In general, it tries to adopt the downtime handling over to comments. This PR is based on #375. Since the internal object structure changes, all NEB modules have to be rebuild. (We therefor increase CURRENT_NEB_API_VERSION to 6) Signed-off-by: Sven Nierlein <[email protected]>
This is my attempt to patch #374. Would be good if you could review this.
Signed-off-by: nook24 [email protected]