Optimize barrier-implied flushes 61/20961/1
authorRobert Varga <rovarga@cisco.com>
Sat, 16 May 2015 00:21:19 +0000 (02:21 +0200)
committerMichal Polkorab <michal.polkorab@pantheon.sk>
Fri, 22 May 2015 11:01:20 +0000 (13:01 +0200)
commitf1f556a90176490a6044dbd76b0d14b9d81520c1
tree68a8913497cc325f0693e031a30cdf327256a42a
parent1f50196a10fcf578451417d76629b94d71d33873
Optimize barrier-implied flushes

Original code did a full queue scan up to the current request. This
is inefficient if there are previously-completed barriers, as we end up
checking the same slots multiple times.

Remember the offset of last completed future and only flush slots from
that offset on subsequent barrier completion.

Change-Id: I9715f9f7818de611c01d0cd2eaa7637ac5372e91
Signed-off-by: Robert Varga <rovarga@cisco.com>
(cherry picked from commit 7da0dcda4b5d9e5c4510ceb8e4d7840696fbdd90)
openflow-protocol-impl/src/main/java/org/opendaylight/openflowjava/protocol/impl/core/connection/OutboundQueueImpl.java