Run GC when needed, instead of too late.
Bug: 12164855 Change-Id: Ie4d8be9f2652b01470bcc06911e2191e09fb3149
This commit is contained in:
parent
97a553ae69
commit
4196360912
1 changed files with 3 additions and 3 deletions
|
@ -91,9 +91,9 @@ public class Ver4DictEncoder implements DictEncoder {
|
|||
for (final WeightedString word1 : word0.mBigrams) {
|
||||
binaryDict.addBigramWords(word0.mWord, word1.mWord, word1.mFrequency,
|
||||
0 /* timestamp */);
|
||||
}
|
||||
if (binaryDict.needsToRunGC(true /* mindsBlockByGC */)) {
|
||||
binaryDict.flushWithGC();
|
||||
if (binaryDict.needsToRunGC(true /* mindsBlockByGC */)) {
|
||||
binaryDict.flushWithGC();
|
||||
}
|
||||
}
|
||||
}
|
||||
binaryDict.flushWithGC();
|
||||
|
|
Loading…
Reference in a new issue