From 678aa6530062e4db2afc5eadea82681e4ba49a1a Mon Sep 17 00:00:00 2001 From: Yorke Lee Date: Thu, 8 Nov 2012 13:13:24 -0800 Subject: Use a custom character map instead of name normalizer Instead of normalizing names during caching, add a function that that maps accented characters to their alphabetic equivalents using switch statements. This character map is used in the on-the-fly matching algorithm. This speeds up the caching process(11k contacts) from 800-1500ms to about 600-1000ms since we no longer perform the normalizing step during caching. Bug: 6977981 Change-Id: I98dfc3cba00258bb7ff03b346eab7ca7dc1065be --- tests/src/com/android/dialer/SmartDialNameMatcherTest.java | 1 - 1 file changed, 1 deletion(-) (limited to 'tests') diff --git a/tests/src/com/android/dialer/SmartDialNameMatcherTest.java b/tests/src/com/android/dialer/SmartDialNameMatcherTest.java index babae55fa..492e5b422 100644 --- a/tests/src/com/android/dialer/SmartDialNameMatcherTest.java +++ b/tests/src/com/android/dialer/SmartDialNameMatcherTest.java @@ -106,7 +106,6 @@ public class SmartDialNameMatcherTest extends TestCase { final SmartDialNameMatcher matcher = new SmartDialNameMatcher(query); final ArrayList matchPositions = new ArrayList(); - displayName = SmartDialNameMatcher.stripDiacritics(displayName); final boolean matches = matcher.matchesCombination( displayName, query, matchPositions); Log.d(TAG, "query=" + query + " text=" + displayName -- cgit v1.2.3