Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 63d33f42 authored by Keisuke Kuroyanagi's avatar Keisuke Kuroyanagi
Browse files

Increase terminal cache size for gesture.

Before:
(0)  670.00 (10.52%)
(1)  5530.00 (86.81%)
(2)  120.00 (1.88%)
Total 6370.00 (sum of others 6320.00)

After:
(0)  730.00 (11.06%)
(1)  5750.00 (87.12%)
(2)  100.00 (1.52%)
Total 6600.00 (sum of others 6580.00)

Bug: 13773693
Bug: 10701902
Bug: 9505397
Change-Id: Ie53640994180a7acabe05da544ab2166403e2394
parent bc9500fb
Loading
Loading
Loading
Loading
+1 −0
Original line number Diff line number Diff line
@@ -45,6 +45,7 @@ class Traversal {
    virtual float getMaxSpatialDistance() const = 0;
    virtual int getDefaultExpandDicNodeSize() const = 0;
    virtual int getMaxCacheSize(const int inputSize) const = 0;
    virtual int getTerminalCacheSize() const = 0;
    virtual bool isPossibleOmissionChildNode(const DicTraverseSession *const traverseSession,
            const DicNode *const parentDicNode, const DicNode *const dicNode) const = 0;
    virtual bool isGoodToTraverseNextWord(const DicNode *const dicNode) const = 0;
+1 −1
Original line number Diff line number Diff line
@@ -88,7 +88,7 @@ void Suggest::initializeSearch(DicTraverseSession *traverseSession) const {
    } else {
        // Restart recognition at the root.
        traverseSession->resetCache(TRAVERSAL->getMaxCacheSize(traverseSession->getInputSize()),
                MAX_RESULTS);
                TRAVERSAL->getTerminalCacheSize());
        // Create a new dic node here
        DicNode rootNode;
        DicNodeUtils::initAsRoot(traverseSession->getDictionaryStructurePolicy(),
+4 −0
Original line number Diff line number Diff line
@@ -146,6 +146,10 @@ class TypingTraversal : public Traversal {
                : ScoringParams::MAX_CACHE_DIC_NODE_SIZE;
    }

    AK_FORCE_INLINE int getTerminalCacheSize() const {
        return MAX_RESULTS;
    }

    AK_FORCE_INLINE bool isPossibleOmissionChildNode(
            const DicTraverseSession *const traverseSession, const DicNode *const parentDicNode,
            const DicNode *const dicNode) const {