Avoid too many calls to waitbar
Performance tuning