resourceloader: Optimise getMimeType() for common case
authorTimo Tijhof <krinklemail@gmail.com>
Sat, 25 Mar 2017 03:20:44 +0000 (20:20 -0700)
committerTimo Tijhof <krinklemail@gmail.com>
Sat, 25 Mar 2017 03:23:11 +0000 (20:23 -0700)
commitf02454b12ca961aee2fa6e9085a0918cd24ce523
tree9a40141a0bd96b763dac24fada63f26cf8b1b78f
parent1df6b21c90965ec7bb204d6fbab6082cc5805c3a
resourceloader: Optimise getMimeType() for common case

About 0.74% of load.php is spent in CSSMin::getMimeType/finfo_file.

We don't apply this to user-generated content of external urls,
only local files in version control. And in terms of correctness,
we don't support misleading file names, so it's not a problem that
a foo.png containing XML/SVG content would get the wrong mime-type
when base64 embedding it in CSS.

Change-Id: I17686467c897984117671098e94db8732446dc75
includes/libs/CSSMin.php