Skip to content
  • Michael Hanselmann's avatar
    jqueue: Add short delay before detecting job changes · dfc8824a
    Michael Hanselmann authored
    
    
    By sleeping for 100ms after receiving a notification for a changed job
    file the job is given some additional time to change again. This
    significantly reduces the number of LUXI calls for WaitForJobChanges
    (depending on the job, in my tests with “gnt-cluster verify
    --debug-simulate-errors” by about 80%), and improves performance (the
    same job went from around 7 seconds to around 3.5 seconds).
    
    This method is not perfect. The algorithm could be made more complex,
    e.g. by increasing the delay on each change, etc., but for now this
    simple change provides a good improvement.
    
    Signed-off-by: default avatarMichael Hanselmann <hansmi@google.com>
    Reviewed-by: default avatarIustin Pop <iustin@google.com>
    dfc8824a