give Serializer API a way to feed back progress
Brought to you by:
sgbeal
With the advent of the sqlite3_serializer, it became
clear that we need some way for Serializers to feed
back some form of status info, even if only a
"heartbeat." Since the Serializers are stream- and
tree-oriented, most of them can't know in advance how
much they will read. They can "tick" once per node,
anyway. DB-based serializers can know how many they'll
read before they read it, and could send more detailed
progress info. Maybe a callback with a signature like:
void show_progress( Serializer const * context, int
pos, int total = 0 );
total == 0 means that the serializer don't know how
many units (nodes) he'll eventually read.
Logged In: YES
user_id=32742
Related: we need a way of cancelling a de/serialize
operation, even if it's not supported by all Serializers.
The sqlite3 variant reads very, very slowly on large data
sets (~20-40 nodes/second), and needs to be cancelled sometimes.