Performance: Shortcut Language::truncate if there's no need to truncate
authorJesús Martínez Novo <martineznovo@gmail.com>
Sat, 17 Jun 2017 11:56:14 +0000 (13:56 +0200)
committerUmherirrender <umherirrender_de.wp@web.de>
Fri, 12 Jan 2018 21:05:17 +0000 (21:05 +0000)
commit92e74356e2afec139d2dcafa55f9de5609f32ebc
treec1f274565582dac4509ad44e496f240e89e3298f
parent574065ebddf25b1ae95b0c6b4f8e5c4887263e67
Performance: Shortcut Language::truncate if there's no need to truncate

Return the unmodified string if there's no need to truncate it without
doing a not-so-trivial round of getting a message from the message
cache.

Change-Id: I11ac88672aeb9d1c4f5709b79ad2d17223bd64d8
languages/Language.php