Am 02.01.2006 um 09:30 schrieb Stephen Deasey:

Right.  So the thread handling the upload would lock/unlock every
upload_size/10Kbytes or seconds_to_upload.  The frequency of locking
for the every 10Kbytes case would increase (and hence chance of
blocking) with the capacity of your and your clients connection.

Another thread would lock/unlock every time the client requests an
update on the progress, say once per second.

Multiply the above by the number of concurrent clients.


That's the price you pay for upload stats and that's OK.  I wouldn't
want that overhead when I'm not interested in the stats though...

In which case you'd:

  a. have no threads asking for the stats
  b. have only the upload thread do locks every 10k or such

so the locking will decrease even more. Furthermore, if you
set the upload_size to zero then we can entirely skip that
hence no locking would occur.

I believe that this is fair for everybody. People needing
that stats can turn it on. People never interested in that
can leave the default (no stats) and all are happy?

Zoran


Reply via email to