diff options
author | Chang Li <licha@google.com> | 2022-04-04 15:11:10 +0000 |
---|---|---|
committer | Chang Li <licha@google.com> | 2022-04-04 15:11:10 +0000 |
commit | 84b3aa147eabb6fbb916aa20e1e7b5613b267304 (patch) | |
tree | 42498f8f43714aea6f9c27aff3fc9f0c31f23222 | |
parent | 0c1f32bfa21cdcd618b55c4e8dd4f122e9a59af1 (diff) | |
download | libtextclassifier-84b3aa147eabb6fbb916aa20e1e7b5613b267304.tar.gz |
Remove expensive logging statement.
This logging statement is expensive (maybe because of stringification)
and it is on the TextClassifier API critical path. Remove it. In the
future, we can log model lookup info only when we need to reload the
model (i.e. the lookup result changes).
BUG: 225081632
Change-Id: I14f950e4101027d1a6596fd1c459c4c4440b8379
-rw-r--r-- | java/src/com/android/textclassifier/ModelFileManagerImpl.java | 13 |
1 files changed, 1 insertions, 12 deletions
diff --git a/java/src/com/android/textclassifier/ModelFileManagerImpl.java b/java/src/com/android/textclassifier/ModelFileManagerImpl.java index e3b646f..45426d0 100644 --- a/java/src/com/android/textclassifier/ModelFileManagerImpl.java +++ b/java/src/com/android/textclassifier/ModelFileManagerImpl.java @@ -390,18 +390,7 @@ final class ModelFileManagerImpl implements ModelFileManager { localePreferences.get(0), targetLocale)); } - ModelFile modelFile = findBestModelFile(modelType, targetLocale); - TcLog.d( - TAG, - String.format( - Locale.US, - "findBestModelFile: best model: %s; localePreferences: %s; detectedLocales: %s;" - + " targetLocale: %s", - modelFile, - localePreferences, - detectedLocales, - targetLocale)); - return modelFile; + return findBestModelFile(modelType, targetLocale); } /** |