Re: Event loop



Nils Rennebarth <nils ipe uni-stuttgart de> writes:
In my application I have to save a 1MB image to a file using .png which
takes a lot of time on that oldish P166. What would you suggest to use for
saving the image "in the background"?


libpng may support progressive saving. If it does, an idle handler is
easy to support; just feed some fixed small chunk of data into the
saver on every idle. If it doesn't, you are pretty much forced to use
a thread or process unless you write your own PNG encoder. I'll stay
out of the "threads vs. processes" debate. ;-)

Havoc





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