[TYPO3-core] RFC: devLog in t3lib_db

Michael Stucki michael at typo3.org
Fri Dec 1 16:09:32 CET 2006

Hi Dmitry,

> > - As mentioned before, I would prefer to use syslog instead of devlog.
> Copying my reply from another thread: "I would favor syslog too but it
> does not accept data parameter and adding such thing as a message body
> would cause BE to load very slowly due to large amount of text
> information. So it will be nearly useless for *quick* diagnosing of the
> problem. devLog (especially Robert's file-based) can be installed
> quickly on demand and viewed with "more" and "tail", so I finally
> decided on devLog."

I'll think about a solution to this. Maybe we can change it before 4.1 is out.

> > - Could you please check if it's faster to call the function in any
> >   situation, or wrap each call with an "if (FALSE !== $res) ..."
> Do you mean
> -----------------
> 	if (false !== $res) {
> 		return myql_whatever($res);
> 	}
> 	devLog(...)
> -----------------
> ?

Yes, though I wanted to write it vice-versa. But yes, this is what I intended.

> It means we will have to copy the same piece of code (including string)
> to six places. I did that initially but than thought that we may want to
> isolate all checks inside one function (easier to extend and/or maintain
> later).

Right, that's why I was first asking.

> I made with 100000 loops: function call takes ~0.15s (=0,0000015 per
> call) and "if (false != ...)" takes ~0.04s (0,0000004 per call). Even of
> we do 1000 calls to these functions per request, different will be
> 0.001s. This is on my laptop with 800MHz CPU, so it will be even less
> different on a typical server. Nothing comparing to actual database call.

OK, so keep it as it is, and go ahead!

- michael
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: not available
Url : http://lists.netfielders.de/pipermail/typo3-team-core/attachments/20061201/097db538/attachment-0001.pgp 

More information about the TYPO3-team-core mailing list