CPPSERV


Home Projects Jobs Clientele Contact

cppserv


[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Log class problems



Reasoning is the best fight. It is about performance after all.

Thibaut Colar wrote:

Fight, Fight, Fight !!!

Ilya A. Volynets-Evenbakh wrote:

Alexey Parshin wrote:

2. Nope. I don't like it. You lose :P



It doesn't work like that ;-) I gave you an argument, and want to hear
reasoning in return.

3. Ok. I don't think it will happen too often, anyway.



This is both security and performance issue. Resizing takes time, which
we don't need to spend, and may allow DDoS attack, which we don't want
to allow. At the same time, allocating 1K array inside of an object itself
will be pretty much free in all respects.

2006/1/31, Ilya A. Volynets-Evenbakh <ilya@total-knowledge.com>:


2. With my propositions one need not know anything about iostreams
  Instead one will need to override single method - saveMessage,
  but in LogStreamBuf, not in LogStream. This is not performance issue
  (performance will be the same), but instead it's philosophy issue.

  As for simplicity - my way there is only one-way tie between stream
and streambuf,
  and you have two-way tie. I win.

3. We'll break it in my case as well. Just in my scenario you don't need
to
  even think about memory allocation/deallocation. Everything will be
  taken care of automatically.

Alexey Parshin wrote:





--

Anatoly Volynets, Co-Founder
total-knowledge.com
culturedialogue.org


Authoright © Total Knowledge: 2001-2008