cURL
Haxx ad
libcurl

curl's project page on SourceForge.net

Sponsors:
Haxx

cURL > Mailing List > Monthly Index > Single Mail

curl-users list Archives

Re: Progresss Bar performance bug in Windows

From: Daniel Stenberg <daniel_at_haxx.se>
Date: Mon, 29 Jul 2013 23:20:54 +0200 (CEST)

On Mon, 29 Jul 2013, Doughty, Marc wrote:

> Greetings,
> I'm using cURL in a script on Windows 8. The script runs in Powershell
> and downloads very large files via HTTP. When I set the '--progress-bar'
> option, I noticed that the download was slow, the CPU usage was very high
> (one core @ 100%), and that the progress bar itself appeared to be
> 'flickering' in the console window. Switching to normal operation fixed the
> problem, but I want my users to see the progress bar and not other download
> statistics.
> I'm sure there are plenty of ways to reduce the amount of 'drawing'
> that's happening. Could the progress bar only update the console when
> there's enough to 'bump up one step', or possibly at a certain timed
> interval that would be 'polite' to system resources?

Are you absolutely sure this was with 7.31.0 ? It just *so* sounds like the
7.30.0-bug we fixed in commit 0feeab7802dd2a...

But to answer the question: yes, the progress callback should only be called
when there is data being sent (or at a 1000ms interval), and the callback
src/tool_cb_prg.c:tool_progress_cb() has logic that avoids to redraw the line
if it indeed is the same length as in the previous invoke.

So, I don't know why it flickers nor do I know why it would be called to get
redrawn too often.

Are you doing extremly fast transfers?

-- 
  / daniel.haxx.se
-------------------------------------------------------------------
List admin: http://cool.haxx.se/list/listinfo/curl-users
FAQ:        http://curl.haxx.se/docs/faq.html
Etiquette:  http://curl.haxx.se/mail/etiquette.html
Received on 2013-07-29

These mail archives are generated by hypermail.

donate! Page updated May 06, 2013.
web site info

File upload with ASP.NET