patch: improve cgi speed

Matthew Kent mkent at magoazul.com
Thu Sep 30 22:06:34 CEST 2004


In a follow up to
http://thread.gmane.org/gmane.network.nagios.devel/1148 I've found
another unnecessary service sort when preparing the data for display in
the cgi's. It's a nice sort to have for nagios core (to write out
alphabetically sorted service definitions to the cache), but the cgis
don't need it.

Removing it has no side effects that I can demonstrate thus far and cuts
the time to render tac.cgi and status.cgi in half.

Applying this patch and the previous one mentioned in the thread above
take the time to render tac.cgi and status.cgi for 4239 hosts and 16880
services from between 50secs-64secs to 11secs on my ram starved Pentium
M 1.2Ghz laptop (256mb ram).

Patch is against latest cvs, and please let me know if it breaks
anything.

Also I've started collecting these patches here
http://magoazul.com/proj/nagios/patches/ in the hope that Ethan will
return and look at them someday.

If not then maybe, like Andreas mentioned, creating another repository
is a good idea...
-- 
Matthew Kent <mkent at magoazul.com>
http://magoazul.com
-------------- next part --------------
A non-text attachment was scrubbed...
Name: nagios-2.0a1-speedup_cgis.patch
Type: text/x-patch
Size: 1062 bytes
Desc: not available
URL: <https://www.monitoring-lists.org/archive/developers/attachments/20040930/5854e166/attachment.bin>


More information about the Developers mailing list