From cc2f788364b5cca05b62932432e6f7e6a8cb7aae Mon Sep 17 00:00:00 2001 From: Renuka Manavalan <47282725+renukamanavalan@users.noreply.github.com> Date: Fri, 15 Jan 2021 11:39:49 -0800 Subject: [PATCH] Drop explict 3 seconds pause between two object updates/deletes. (#1359) - What I did Drop explicitly introduced 3 seconds pause between object updates using configlet. - How I did it Remove the added time.sleep(3) - How to verify it Add 10 objects using old code and see it takes 30+ seconds. Repeat the same with this updated code which would complete in small fraction of a second. Verified ASIC-DB contents to the extent possible in both scenarios of applying objects using old code with 3 seconds pause and new code w/o any explicit pause, to be the same. --- scripts/configlet | 6 ------ 1 file changed, 6 deletions(-) diff --git a/scripts/configlet b/scripts/configlet index 44b0047a49..4d519d3943 100755 --- a/scripts/configlet +++ b/scripts/configlet @@ -77,7 +77,6 @@ A sample for update: import argparse import json -import time from swsssdk import ConfigDBConnector @@ -204,11 +203,6 @@ def main(): if parse_only == False: for i in data: process_entry (do_update, i) - # Artificial sleep to give a pause between two entries - # so as to ensure that all internal daemons have digested the - # previous update, before the next one arrives. - # - time.sleep(3) else: print("Parsed:") print(data)