compute progress bar both on server and on client (for fast initial view and dynamic update)