Re: What to return in async transfer callbacks?



Alexander Larsson wrote:
If you're copying a directory with a million small files in it, then
progress_sync_callback will be called a million times, with the source
and target filename for each file. progress_update_callback however,
will at most be called every 100 msecs for progress updates. Both are
called when you need user interaction, but its better to use the async
one.
Well, if not more than 1 file is copied every 100ms (which seems to be very unlikely to me), the update-callback is in fact the one which is called WAY more often, and should be the faster one, right? ^^

For example, when copying a file which is sized e.g. 100MB, the sync callback would only be called before and after the transfer (if I got that part right), but the update callback would be called probably thousands of times.

Still, I am not sure about whether I was right with the confused parameters. Can you really confirm that? After reading the nautilus source code (or the relevant parts), it looks as if they are passing the arguments in the order specified by the documentation I claimed to be wrong (because it didn't work for me). In other words, I'm not so sure afterall if I was right with that observation, since it seems to work for the nautilus guys.

I'm really confused now.

In short, unless you want to know the exact operation taking place in
the operation just ignore the sync callback.

Okay.

Regards,
Matthias




[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]