Re: fork() and progress bar...



On Fri, 2001-09-07 at 21:55, Paul Davis wrote:
> >What I do is to retrieve a row per call to the timeout function, so you
> >can do the same and, at the same time you fetch one row, you can update
> >the progress bar.
> 
> You're kidding, right? You fetch one row *per call* to the timeout
> function? What happens if you're fetching 1000 rows? With the smallest
> possible timeout being 20ms on most systems, thats 20seconds minimum
> to execute something that would probably take way under 1 second
> normally ... perhaps your description just wasn't clear.
> 
no, I was not kidding, I fetch a row per call. I know it could be done
quicker by using threads, but at the time I coded that, I didn't want to
use threads.

Although I think you're right that it may be slow, so I'll change it to
get more rows in each call.
For the gnome 2 version, I'm moving it to use threads instead.

cheers
-- 
Rodrigo Moya <rodrigo gnome-db org> - <rodrigo ximian com>
http://www.gnome-db.org/ - http://www.ximian.com/




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