patch: speed up status.cgi

Matthew Kent mkent at magoazul.com
Thu Sep 23 04:37:14 CEST 2004


I took a look at some of the functions Jason Martin mentioned a while
back when he profiled status.cgi. I found that add_service_status does
some unnecessary sorting when reading service status entries back for
output. From what I can tell, the output of status.dat is already sorted
alphabetically by hostname and service so I can't see the need to
resort.

Striping that out took displaying 18,000 services from 50 seconds to 20.
For 4500 services it was the difference between 5 and 2 seconds.

Patch included against latest cvs.
-- 
Matthew Kent <mkent at magoazul.com>
http://magoazul.com
-------------- next part --------------
A non-text attachment was scrubbed...
Name: nagios-2.0a1-speedup_status.patch
Type: text/x-patch
Size: 3501 bytes
Desc: not available
URL: <https://www.monitoring-lists.org/archive/developers/attachments/20040922/cd129947/attachment.bin>


More information about the Developers mailing list