[ONOS-5839] Performance issue at onos-app-pceweb fix.
Change-Id: Ib3585ea5510491576ec34ebf2b007292479d42bd
diff --git a/apps/pce/pceweb/src/main/java/org/onosproject/pceweb/PceWebTopovMessageHandler.java b/apps/pce/pceweb/src/main/java/org/onosproject/pceweb/PceWebTopovMessageHandler.java
index c1a1bec..f5b1419 100644
--- a/apps/pce/pceweb/src/main/java/org/onosproject/pceweb/PceWebTopovMessageHandler.java
+++ b/apps/pce/pceweb/src/main/java/org/onosproject/pceweb/PceWebTopovMessageHandler.java
@@ -702,13 +702,10 @@
}
}
- /**
- * Handles the event of topology listeners.
- */
private void findTunnelAndHighlights() {
Collection<Tunnel> tunnelSet = null;
Highlights highlights = new Highlights();
- paths.removeAll(paths);
+ paths.clear();
tunnelSet = tunnelService.queryTunnel(MPLS);
if (tunnelSet.isEmpty()) {
log.warn("Tunnel does not exist");
@@ -747,12 +744,9 @@
hilightAndSendPaths(highlights);
}
- /**
- * Handles the event of topology listeners.
- */
private void highlightsForTunnel(Tunnel tunnel) {
Highlights highlights = new Highlights();
- paths.removeAll(paths);
+ paths.clear();
if (tunnel.path() == null) {
log.error("path does not exist");
sendMessage(highlightsMessage(highlights));