wiki.techinc.nl/includes/debug/logger
Tim Starling a4ae47a7b7 Optimise no-op debug logging in LegacyLogger
Reduce the cost of calling LegacyLogger::debug() when there is no debug
log enabled (the normal production case) from 0.8µs to 0.2µs, measured
locally, by duplicating some of the logic from log() and shouldEmit() to
derive a constant "minimum level".

I also introduced constants for the integers, to avoid unnecessary
lookups in self::$levelMapping, and I introduced $this->isDB, to avoid a
hashtable lookup in log(). I fixed a typo in a comment, and removed
"@return null", which was confusing PHPStorm.

Change-Id: I9fc37b8062ff22f85feda9a05821e3d8c9688519
2019-11-21 14:27:47 +11:00
..
monolog Convert some private static arrays to constants 2019-10-16 01:30:54 +00:00
ConsoleLogger.php
ConsoleSpi.php
LegacyLogger.php Optimise no-op debug logging in LegacyLogger 2019-11-21 14:27:47 +11:00
LegacySpi.php
LogCapturingSpi.php
LoggerFactory.php
MonologSpi.php Fix new phan errors, part 8 2019-10-22 10:09:13 +02:00
NullSpi.php
Spi.php