Performance of mediawiki.searchSuggest.js
authorThiemo Mättig <thiemo.maettig@wikimedia.de>
Fri, 14 Feb 2014 12:58:44 +0000 (13:58 +0100)
committerThiemo Mättig <thiemo.maettig@wikimedia.de>
Fri, 14 Feb 2014 12:58:44 +0000 (13:58 +0100)
commitc899b00f942ce8bff3ed416247e0120ceaebe693
treed78e79c2e25f71e65e675f8e4fe8046cff4367aa
parent3b63e426abf0f7085cb1e63d63a6a93deb9dbe49
Performance of mediawiki.searchSuggest.js

Two tiny performance improvements.

The complexity of a regular expression is not needed to check if a
string contains a character. string.match() returns an array of
matches which is not used anyway in this case. Either
string.indexOf() or RegExp.test() should be used.

Duplicate jQuery call merged.

Change-Id: Ifec79eada70181df0d56c583ef832ee82594620e
resources/mediawiki/mediawiki.searchSuggest.js