wiki:GSoC/2010/Proposals/LunohoD

Project proposal

Evas_Image memory optimizations and low-bpp xcb-based Evas engine.

OpenInkpot is a mature Linux distribution for e-ink based ebook reading devices. It is now perfectly suitable to exchange custom firmware on some devices and even to be the default one on another devices. There are still some major issues caused by the limited resources of the target devices. One of that issues is the memory utilisation. Nowadays ebooks typically have 32 or 64 Megabytes of RAM. There are also older devices with 16 MB RAM available. EFL libraries which are being used in OpenInkpot for GUI need improvement to be used in those conditions. E.g., the image loading and rendering part of the Evas (canvas library) keeps the loaded images in memory in ARGB format (4 bytes per pixel) and the rendering mechanism is also using 32-bit ARGB temporary buffers. This often leads to out-of-memory issues even on devices with 32MB and there is no chances to fit OI into 16MB. Furthermore, working with such amount of data introduces a notableimpact on UI latency, which even exceeds the slowness of the e-ink screen. The e-ink screen is able to display only up to 16 shades of gray, while most reading devices supporting only 4 or 8 shades of gray. Therefore it is just an overkill to store ARGB data in memory.

I'm targeting to eliminate the introduced issues. At first, I'll implement a new 8bpp xcb-based Evas engine, which will utilize 4 times less memory than the default one. There are changes needed in Evas common engine, Evas rendering backend and Ecore_Evas module. In the next phase, I'll optimize Evas_Image Module. If there are no modifications to the image, it's data should be mmap'ed and not read into ARGB buffer in memory. An image object should be able to draw picture directly from mmap'ed Edje file whithout using temporary buffers, thus will enable several application sharing single Edje file without duplicating image data in memory. Eina should be changed so that the bitmap could be exposed directly to Evas engine. If time allows, I'll fix various bugs in OI after reaching my primary goals.

Deliverables for mid-term evaluation: working 8bpp xcb-based Evas engine. Deliverables for the final evaluation: optimized Evas_Image Module; all changes committed to OpenInkpot repo, packaged and tested.

The resulting code will be submitted back to EFL as soon as possible.

Reasons

I'm one of the core developers of the OpenInkpot. I've started working on it two years ago and it was my first GSoC project. My goal back then was to port Englightenment Foundation Libraries and FBReader. Thus making OI really usable for the end-user. I've successfully finished that project and stayed with OpenInkpot for another two years - until now. Working on OpenInkpot was always big fun and a great ability to learn. This is my final year in the university and I'm looking to spend this summer working full-time for OpenInkpot if my proposal will be accepted. I know OI's strengths and weaknesses and I'm able to improve the former and fix the latter. I'm also familiar with EFL internals, in particular with Evas rendering engines.

Experience in open source development

My major open source related development experience was gained within the OpenInkpot. I was working on porting existing libraries and applications and developing new ones. I've also packaged and supported some of the OI's packages.