LINBIT / drbdtop

CLI management tool for DRBD. Like top, but for DRBD resources.
GNU General Public License v2.0
48 stars 14 forks source link

Avoid repeated creation of the DisplayEvent #3

Closed raltnoeder closed 7 years ago

raltnoeder commented 7 years ago

Since the event used as a display update notification always contains the same data, only one instance needs to be created. Instead of creating a new instance inside the loop, an instance is created before entering the loop, and that instance is then reused inside the loop.