]> git.ipfire.org Git - thirdparty/sarg.git/commit - report.c
Speed up the second stage of the report generation
authorFrédéric Marchal <fmarchal@users.sourceforge.net>
Wed, 1 Feb 2012 10:27:25 +0000 (11:27 +0100)
committerFrédéric Marchal <fmarchal@users.sourceforge.net>
Wed, 1 Feb 2012 10:27:25 +0000 (11:27 +0100)
commitd8e04f05fe047c7f95ca768baa303ce715cef6b6
tree49c6b4c26e4edf681586283af6ab6249b48feb51
parentd91457d25a030fddc63bbfa1220363704cdaeff2
Speed up the second stage of the report generation

A lot of temporary files are produced after the log is split into several
files each containing the data of the users but those temporary files were
constantly being opened and closed for each line to be written into. It
was a small waste of time.

The new processing opens the temporary user's files once per user, process
the data of the corresponding user and generate the temporary file with
those data. The gain is roughly 10% on my data set.
report.c