Revision 9714ae6...
Go back to digest for 19th January 2014Optimization in Office
Boudewijn Rempt committed changes in [calligra] /image:
Band-aid the fill algorithm
This does two things:
* Cut down the memory usage of the map by 75%. The map was an array
of enum, which is int, which is four bytes per item, and the allowable
values per item were 0, 1, 2. For which a char is enough. Well, 2 bits
is enough, but that's too much fiddling for now.
* Before I noticed the preceding, I implemented a frugal way of handling
the map, using a tiled paint device. That cannot run out of memory thanks
to the swapper. So if, if, if the allocation of the map of quint8 fails
due to bad_alloc, fall back to this frugal implementation.
File Changes
Modified 2 files
- /image
- krita/kis_fill_painter.cc
- krita/kis_fill_painter.h
2 files changed in total