Boost logo

Boost :

Subject: Re: [boost] [log] Boost.Log Formal Review
From: Stewart, Robert (Robert.Stewart_at_[hidden])
Date: 2010-03-18 11:18:16


sam.gundry_at_[hidden] wrote:
>
> A concern, which again Andrey has mentioned during this
> review, is the speed of Boost.DateTime formatting. From our
> comparisons, it is about 3-5x slower than log4cxx. Is it
> possible to have a bare-minimum date time formatter similar
> to log4cxx's implemented? I wrote a quick little wrapper
> using a customised strftime (for microseconds) with the most
> basic caching (which log4cxx's formatter uses) and
> performance was comparable.

In our logging library, date/time formatting was likewise too sluggish. I now track midnight as a time_t, with the date string, and then compute the current time relative to midnight, do a little math, and the result is a very fast computation of the current time. Of course, I also have to determine if the current time is more than 24 hours since the cached midnight to detect when the cached values must be updated.

_____
Rob Stewart robert.stewart_at_[hidden]
Software Engineer, Core Software using std::disclaimer;
Susquehanna International Group, LLP http://www.sig.com

IMPORTANT: The information contained in this email and/or its attachments is confidential. If you are not the intended recipient, please notify the sender immediately by reply and immediately delete this message and all its attachments. Any review, use, reproduction, disclosure or dissemination of this message or any attachment by an unintended recipient is strictly prohibited. Neither this message nor any attachment is intended as or should be construed as an offer, solicitation or recommendation to buy or sell any security or other financial instrument. Neither the sender, his or her employer nor any of their respective affiliates makes any warranties as to the completeness or accuracy of any of the information contained herein or that this message or any of its attachments is free of viruses.


Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk