[Slogger] Re: Sigh
Ken Schutte
kschutte at MIT.EDU
Mon Dec 5 08:37:06 EST 2005
Jon B wrote:
>>>be done to improve this? I wonder if it is the log file or the data
>>>files that is slowing it down.
>>>
>>
>>That is odd, I do not experiance this due to slogger, but my session
>>saver sure slows it down.
>>25+ pages for a average load, twice or better when doing work
>
>
> It definitely got a lot faster at the beginning of the month (my
> Slogger is configured to create a new directory every month. I'm sure
> it varies by slogger configuration and the amount of time spent on the
> web) And it speeds up if I disable slogger. Keep in mind I have it
> set to log the HTML of *every* page I visit, and to keep a separate
> HTML log file with a list of each page. The log file was something
> like 6 MB at the end of the month, which could be the problem by
> itself. (Does it have to open the entire file every time it appends a
> page?) I'm going to change it to creating a new directory every day
> or week instead, for now.
Ahh that's got to be it - it does read in the entire log file each time
and writes a new one. Of course it would be much faster to just append
to the log each time, but I changed it not to do this to allow some
amount of "footer" in the log file, so it could be valid html,xml,etc.
It reads in the whole file and writes out everything but the last N byes
(where N is length of footer), then writes the new stuff, then the
footer. Maybe there's a way to append to a file while removing the last
N bytes, or at least have it just append when there is no footer... I
have it start a new log file each day, so never really noticed it.
Ken
More information about the Slogger
mailing list