[Nagios-devel] A idea to speed up access times to service records

Support forum for Nagios Core, Nagios Plugins, NCPA, NRPE, NSCA, NDOUtils and more. Engage with the community of users including those using the open source solutions.
Locked
Guest

[Nagios-devel] A idea to speed up access times to service records

Post by Guest »

Hi.

I was looking through the code while I was attempting to patch the glib
hash functions into the 1.x codebase, and was thinking that the services
hash table wasn't ideal.


wouldn't it be better if there was a linked list of services for each
host (instead of either a global linked list/hash on host/service name)


ie.. in the host structure you would have something like

host_struct {
...
service *service_head;
..
}

and in the service_struct something like

service_struct {
..
service *service_next;
host*host
}

this was you could navigate around instead of having to go through all
the lists the matching host/service.
I think the above would work better than having a hash on the combined
service/host names. and you could use this in a lot of places in the
nagios code.

oh.. a humble request..
can someone please run indent on the code in CVS and check that in.


Regards
Ian.

--
Ian Holsman
blog: http://blog.holsman.net
PH: 03-9857-3742 (oz)






This post was automatically imported from historical nagios-devel mailing list archives
Original poster: [email protected]
Locked