Xhprof generates this data now. Custom profiling of various
sub-function units are kept.
Calls to profiler represented about 3% of page execution
time on Special:BlankPage (1.5% in/out); after this change
it's down to about 0.98% of page execution time.
Change-Id: Id9a1dc9d8f80bbd52e42226b724a1e1213d07af7
Swapped some "$var type" to "type $var" or added missing types
before the $var. Changed some other types to match the more common
spelling. Makes beginning of some text in captial.
Change-Id: I9bd4ef370016cbbcce42d2612031a264eb3de61b
* Also avoid calling ip2long() on invalid addresses in toHex()
* Also use native base_convert() in toHex() for IPv4
Change-Id: I4fe4e1ac3c91edb9812e4c5bd173e4b54e315934
* Removed clumsy and unused toOctet() method
* Avoid internal use of ugly toUnsigned() method
* Use proper return value for toHex() on failure
* Converted isPublic() to use IPSet
Change-Id: I36d0e08fe96f15380aea77ad4a39e93104023ce3
This adds a new generic library class IPSet, which precomputes
a reasonably-efficient data structure from the input list of
addresses and CIDR net/mask specs for fast runtime matching,
and then uses it to check trusted XFF-setters.
See also: 32b4f19f173fc5cff1029eedee63a39a2d72dd3a
Bug: 57021
Change-Id: Ia3b12fb90c3e7e492374a128943b014481cc2730
Kept wfGetIP() for now because it is still in use in the SecurePoll
extension and in WMF configuration.
Change-Id: Id412e37743f89bb67eb329a2f475f8496cf7b006
These are classes that provide facilities for use by any caller, are
independent of user interface, and have a limited set of dependencies on
the rest of MediaWiki. See the README file for a more precise
definition.
These classes cannot go in includes/libs because of a dependency on the
MediaWiki framework, such as wfDebug() or MWException, but they are
otherwise similar. I thought it would be useful to put them in their own
directory, to make them more discoverable, and as part of a general
program of reducing clutter in the base includes/ directory.
I've probably missed a few classes which could be included here, but the
following classes were considered and were rejected for now:
* Fallback: single caller only
* GitInfo: getViewers() has inappropriate dependencies
* HttpFunctions: depends on configuration, $wgTitle
* PoolCounter: depends on configuration
* CacheHelper: depends on IContextSource, wfMemc()
Also moved a couple of classes into libs/ instead, where that seemed to
be more appropriate.
Change-Id: I274cff805b7d694b728a89b764a049cd62d320fe