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 |
||
|---|---|---|
| .. | ||
| logger | ||
| DeprecationHelper.php | ||
| MWDebug.php | ||