Implementing std.log

Jose Armando Garcia jsancio at gmail.com
Sun May 8 08:45:41 PDT 2011


I am not sure I follow. Writing to disk is slower than writing to
memory so you want to hide some of the cost of logging by either
buffering the write/log requests or messaging the requests to another
thread to do the logging for you. Does that answer your question?

On Sun, May 8, 2011 at 1:03 AM, dsimcha <dsimcha at yahoo.com> wrote:
> Ok, there's clearly been some misunderstanding here.  My real point was, why
> do you need this threading at all?
>
> On 5/7/2011 9:01 PM, Jose Armando Garcia wrote:
>>
>> "Eat your own dog food". D goes to great extend to discourage memory
>> sharing and instead favor message passing. So I figure we should eat
>> our own dog food and use message passing in Phobos.
>>
>> I know that is not a technical argument so let me do the following:
>> implement log buffering, implement a shared memory backend and do a
>> performance comparison of the two approaches on my crappy netbook
>> (which will be unfair but I don't currently have access to a
>> multi-core multi-process machine).
>>
>> Thanks!
>> -Jose
>>
>> On Sat, May 7, 2011 at 8:25 PM, dsimcha<dsimcha at yahoo.com>  wrote:
>>>
>>> On 5/7/2011 5:55 PM, Andrew Wiley wrote:
>>>>
>>>> I'll be sure to try it out in the next few days. Passing messages to a
>>>> separate logging thread seems like it might be a overkill, but it could
>>>> work.
>>>
>>> Can you explain why you did this?  I admittedly don't know much about
>>> logging but my gut instinct is that it's overengineering.  Unless there's
>>> a
>>> good reason that I didn't foresee, I'd much rather just keep things like
>>> logging simple and stupid.
>>>
>
>


More information about the Digitalmars-d mailing list