Huihong Luo wrote:
That's correct observation, but I am proposing a very simple fix for the 1st 1% to show up on progress bar, etc.
Seems I don't understand what exactly you want to improve. It sounds rather user-unfriendly to me to mis-inform the user by letting the progress bar reach 1% faster than it would if a linear scale is used. Additionally that would work directly against the code which tries to calculate a reasonable ETA value.
If changing the arg to float, then I can at aleast know how many bytes has transfered at the begining, instead of 0. Another way is to send back the total bytes transfered, instead of percentage
The change to double certainly sounds relatively easy, but it requires a bit of effort to adapt all places which use the progress notification logic. Besides that we'd need to verify that _all_ client language bindings for both (XP)COM and webservice flavors can correctly deal with floating point values.
The proposal to send the bytes transferred doesn't easily fit into a general purpose progress notification system, as the meaning of a value between 0 and e.g. UINT64_MAX is pretty meaningless to e.g. the GUI.
As long as I don't understand what real problem you're after I can only provide such background information. Don't get me wrong, I'm not opposing changes in this area.
Klaus
--- On *Thu, 10/8/09, Klaus Espenlaub /<[email protected]>/* wrote: From: Klaus Espenlaub <[email protected]> Subject: Re: [vbox-dev] VDCopy() fix for VHD, change progress callback percent to float? To: "Huihong Luo" <[email protected]> Cc: [email protected] Date: Thursday, October 8, 2009, 10:12 AM Huihong Luo wrote: > a related issue, wonder if you like the idea of changing VDCopy callbacks to float/double percentage? right now, it's an int, the 1st 1% may takes more than 3 mins, not user friendly to update the progress bar The progress bar _is_ linear with the offset in the target image. The non-linearity you might observe is most likely a side-effect of dynamic images. Reading/writing them is extremely fast if there is just zeroes in a certain area. Any good ideas how to address this in an image format independent way would be highly appreciated. Klaus
-- Dr. Klaus Espenlaub Sun Microsystems GmbH Werkstrasse 24 71384 Weinstadt Germany ===================================================================== Sitz der Gesellschaft: Sun Microsystems GmbH, Sonnenallee 1, D-85551 Kirchheim-Heimstetten Amtsgericht Muenchen: HRB 161028 Geschaeftsfuehrer: Thomas Schroeder, Wolfgang Engels, Wolf Frenkel Vorsitzender des Aufsichtsrates: Martin Haering ===================================================================== _______________________________________________ vbox-dev mailing list [email protected] http://vbox.innotek.de/mailman/listinfo/vbox-dev
