Skip to content

Commit

Permalink
[finagle-memcached] Minor perf optimizations
Browse files Browse the repository at this point in the history
Removed unnecessary toSeq, also made FrameDecoder an abstract class to avoid more expensive interface calls.

Differential Revision: https://phabricator.twitter.biz/D1173582
  • Loading branch information
mbezoyan authored and jenkins committed Sep 30, 2024
1 parent 8b74e72 commit aafb252
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ package com.twitter.finagle.memcached.protocol.text
import com.twitter.io.Buf
import scala.collection.mutable

private[memcached] trait FrameDecoder[Result] {
private[memcached] abstract class FrameDecoder[Result] {

/**
* Return the number of raw bytes needed, or -1 if a text line is needed.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ object ParserUtils {
segmentStart = segmentEnd + 1
}
}
split.toSeq
split
}

/**
Expand All @@ -69,5 +69,4 @@ object ParserUtils {
num
}
}

}

0 comments on commit aafb252

Please sign in to comment.