Open sh1n1g4m1 opened 4 years ago
@pieceofsummer we are using this in production with a forked build of this project, do you see any issues with this PR, or could we get this merged into upstream? It is a major performance improvement, we had a job that was iterating over a collection with millions of entries so it went from millions of db writes in the extension method to a hundred or fewer, no matter the collection size..
I think there's a more elegant solution, by providing a configurable precision value used for rounding here: https://github.com/pieceofsummer/Hangfire.Console/blob/a1fea1356c46fe70b0a9df1785cf5c138aa18ae0/src/Hangfire.Console/Progress/DefaultProgressBar.cs#L38
So you don't need to track it manually elsewhere.
Change progress bar to only update on integer changes, this prevents excessive database writes.