Open GoogleCodeExporter opened 9 years ago
There is a bigger issue than unlimited appends on OutputString -- it is, after
all,
user-supplied, and has a chance to handle out-of-memory conditions.
Unfortunately
VCDiffStreamingDecoderImpl::decoded_target_ is a simple std::string and it gets
to
buffer the entire output generated by an arbitrary number of delta windows. If
memory
is at a premium (I am dealing with Windows CE where primary process heap is
easy to
exhaust), the optimum approach would be to pass in the delta stream to
DecodeChunk()
window-by-window which the user has no way of doing using the public API.
Thus, while the API proposed above would resolve this issue, a simpler fix
might
suffice to help with out-of-memory condition due to large decoded_target_ size:
why
not [optionally] call TruncateToBeginningOfWindow() on each delta window and
not at
the end of the batch?
The workaround I am going to implement for the moment is to feed very small
chunks to
DecodeChunk() which has got to kill the decoder performance as a side effect :(
Original comment by max.moto...@gmail.com
on 10 Dec 2009 at 2:31
Original comment by jim.rosk...@gmail.com
on 12 Dec 2009 at 8:09
> a simpler fix might
> suffice to help with out-of-memory condition due to large decoded_target_
size:
> why not [optionally] call TruncateToBeginningOfWindow() on each delta window
> and not at the end of the batch?
Thank you for the suggestion! I intend to incorporate it into the next release
of
open-vcdiff.
Original comment by openvcd...@gmail.com
on 17 Dec 2009 at 7:20
[deleted comment]
The suggestion to truncate the target has been implemented, but the original
"pull-model" suggestion is still not addressed.
Original comment by openvcd...@gmail.com
on 30 Nov 2010 at 12:45
Original issue reported on code.google.com by
openvcd...@gmail.com
on 12 Sep 2008 at 6:40