Progress bar not updating

I have a process which build a fairly complex prims hierarchy that is taking anywhere between 15 and 30 seconds, I tried the progress bar as suggested here How do I create a progress bar? - Apps / Code - NVIDIA Developer Forums but I don’t see the progress bar update throughout the process, only at the very end when it gets pick up to 100%. Is this the expected behavior?