We did something similar for a search webpage. But with some query it could take too much and the slowing down of the bar filling wasn't well met with both our users and our boss.
We changed that with bogus writing under the progress bar.
The first bar had "searching" under it, and usually that was enough.
If it was still searching after the bar was at 100%, the bar would start the animation again and we would change the text with random stuff like ("building indexes","fetching images","generating tables",etc...).
> with some query it could take too much and the slowing down of the bar filling wasn't well met with both our users and our boss.
One idea I've toyed with, which adds some complexity, would be some random variation, so that you'd still get some faster jumps at the end, even though the average would be exponential.
We changed that with bogus writing under the progress bar. The first bar had "searching" under it, and usually that was enough.
If it was still searching after the bar was at 100%, the bar would start the animation again and we would change the text with random stuff like ("building indexes","fetching images","generating tables",etc...).