Efreet and XDG temporary breakages!

Hello all,

Users of recent SVN may notice recent breakages around things that use Efreet and FreeDesktop.org (XDG) standards.

The breaks were introduced after changeset:46726 "Eet cache for efreet desktop". The commit title says it all, Sebastian is speeding up our previously quite slow and memory heavy code with Eet-powered cache to be shared amongst multiple processes.

Efreet was the slowest bit in whole E platform, a real pity. But Sebastian invested quite of time to have a third party process to parse all ".desktop" files, generating an optimized blob stored into Eet.

Eet data structures will be quite fast and strings will be only pointers to memory if using functions like eet_eina_file_data_descriptor_class_set(). This is quite good for both load time performance and runtime memory consumption, as no strings need to be allocated (so less Virtual Memory pressure), the pages are shared among different processes and can be sent back to file system, helping applications that actually need memory (less OOM cases). This is quite easy to use, and highly recommended for applications, even when you do not share with other processes.

So why do we have breakages, you might wonder? The crashes are due the way Efreet API was exposed and used. Instead of providing opaque Efreet_Destop structures with getters and setters to fields, it was exposed as direct access struct with public members, making cases such as the following common:

void name_changed(Efreet_Desktop *desk, const char *name)
{
     free(desk->name); /* crash if name is a pointer to mmap()ed file region! */
     desk->name = strdup(name);
}

This is spread all over E17, but major user is desktop file editor. Other parts may do it as well, such as changing the border or ibar/ibox icons.

These issues should be fixed soon. If you'd like to help with patches, just mail them to enlightenment-devel mail list. If you can't avoid these crashes, be sure to checkout the old Efreet meanwhile:

svn checkout -r 46726 http://svn.enlightenment.org/svn/e/trunk/efreet

Sorry about the inconvenience.

Comments

No comments.