Iterators and memory management
Cyrille Berger
cyb at lepi.org
Mon Apr 5 16:59:47 CEST 2004
Hello,
** Iterators **
I have made a new version of iterators, this version is much faster than the
previous. I made some test, and I found a curious result : the example filter
with iterator seem to be faster than the other one.
TODO in iterators :
- an iterator to use with the selection tools
- iterators that will return a pixel structure
- other operators ( + - ...)
But before I do those todo, I will work on the selection tools :
** Selection tools **
I see two ways to store the shape of the selection :
- either we store it in a 2bits mask, it's easy to modify the selection, and
it's easy to use for graphical operations, but it's painfull for the drawing
of the selection box on the screen
- or we can store the border of the selection zone in a broken line, it's
easy for drawing on the screen, we can convert it to a 2bits mask for
graphical operation, but it's painfull to modify the selection
Maybe you have an other idea ?
** Memory Management **
When I was doing some tests with krita, I have been able to fill all my memory
and my swap (and crash my linux), I think we should try to avoid that, maybe
we can when we create a KisTileCommand that we have twice there is twice the
memory needed to store all the tile available. And if there is not enougth
memory, we should destroy the first element of the stack memory.
For instance, for a 5000x5000 image with 4 channels, the image take 100 Mo of
memory, and I suggest that we check that we have allways at least 200 Mo of
free memory.
--
--- Cyrille Berger ---
More information about the kimageshop
mailing list