Another fun facet that can come into play: try to update your progress bar too frequently, and the work it takes to do that update becomes nontrivial and affects the speed of the underlying task. This will be a much bigger problem if your task or tech stack is poorly designed and runs the task in the same thread as the UI, but it can still occasionally be an issue even in multithreaded scenarios.  Fun times!