diff --git a/library/Class/Indexation.php b/library/Class/Indexation.php index 2f4d46abb5110724c433d222a2bd8ec94995f690..3d04ab532c408cf2ac11f3876020f438054c71a6 100644 --- a/library/Class/Indexation.php +++ b/library/Class/Indexation.php @@ -20,7 +20,9 @@ */ class Class_Indexation { - protected static $_instance; + protected static + $_instance, + $_alpha_maj_cache = []; private $articles; // Articles rejetes private $inclu; // Mots inclus @@ -152,9 +154,12 @@ class Class_Indexation { public function alphaMaj( $chaine ) { - return trim(str_replace($this->tableMajFrom, - $this->tableMajTo, - utf8_decode($chaine))); + if (isset(static::$_alpha_maj_cache[$chaine])) + return static::$_alpha_maj_cache[$chaine]; + + return static::$_alpha_maj_cache[$chaine] = trim(str_replace($this->tableMajFrom, + $this->tableMajTo, + utf8_decode($chaine))); } diff --git a/library/storm b/library/storm index 55293638daa939e68641a8d03f40e3820ff12c56..08c073b2bfde86b0d4d4f4ed3ef8503543fa4506 160000 --- a/library/storm +++ b/library/storm @@ -1 +1 @@ -Subproject commit 55293638daa939e68641a8d03f40e3820ff12c56 +Subproject commit 08c073b2bfde86b0d4d4f4ed3ef8503543fa4506