GNOME Desktop Optimizer

Posted 11 months, 1 week ago at 11:32 am. 0 comments

ad 468x60


GNOME Desktop Optimizer 用来优化 gnome 程序,包括 rhythmbox-quickstart,evolution-optimize,gnome-optimize,openoffice-optimize,doc-optimize,gconf-optimize 等几个脚本,大约就是优化那些程序使用的 xml(metadata),使得程序运行更快。

这个页面最下面有下载地址,需要 root 权限来运行(比如 sudo sh gnome-optimize)。

大致原理如下:

OpenOffice.org alone contains 847 XML Metadata, and a fresh install Ubuntu system contains thousands of XML files. XML metadata plays a big role in today’s applications. and optimization for those XML files for improved user experience is not yet being used.
OpenOffice.org默认包含847个xml配置文件,即使刚装好的 ubuntu 也包含上千个 xml 配置文件。在今天,xml 储存软件配置信息已经越来越普遍了,而这些xml都没有优化(删除空格、缩进和换行)。

By XML Optimization, the metadata will be preformatted, by removing the whitespace between the tags, and compacting the whole XML content into a single line, without making any changes in the data inside the tags. The process will make the file much smaller, giving increased memory space, and increased ease for the xml parser to read it.
xml 优化就是删除标签之间的空格和换行,压缩整个xml 为一行,减小xml的尺寸,提高xml解析的速度。

The first phase is to remove the whitespace, tabs, and new lines. The second phase is to compact the whole XML data into a single line. The third phase is to repeat the process again for the optimized XML metadata.
删除空格、缩进和换行

以下为引用内容:

Optimize different GNOME applications to make it more faster and responsive.

XML Optimization is a set of method that reformat the XML metadata for use with XML stream. The process is used in websites to minimize network bandwidth consumption and increase the memory space for the applications who store them locally. XML metadata is used by modern applications like OpenOffice.org, GNOME, Evolution, Rhythmbox, GDM, etc., and is used in SVG graphic rendering. By Optimizing the XML metadata that those applications use, the application who parse them will require less memory usage, and less time parsing, thus improving speed and responsiveness.

Benchmark (Rhythmbox, 7983 songs)

Plain Rhythmbox Database

real 1m4.246s
user 0m17.920s
sys 0m2.508s

—- PC Restarted —-

Optimized Rhythmbox Database

real 0m55.105s
user 0m18.616s
sys 0m2.439s


以下为引用内容:

I made a simple scripts to optimize the XML files that Ubuntu applications use.

XML Optimization is a set of method that reformat the XML metadata for use with XML stream. The process is used in websites to minimize network bandwidth consumption and increase the memory space for the applications who store them locally. XML metadata is used by modern applications like OpenOffice.org, GNOME, Evolution, Rhythmbox, GDM, etc., and is used in SVG graphic rendering. By Optimizing the XML metadata that those applications use, the application who parse them will require less memory usage, and less time parsing, thus improving speed and responsiveness.

Downloads of the scripts are available here: http://www.gnomefiles.org/app.php?soft_id=1397

All of them require root permission, except rhythmbox-quickstart

NOTE: Before running the script, I ask to clock the plain version and the optimized version. tools like sysprof, valgrind, and time, or /usr/bin/time, (not the same). can help. Please post your results here.

The best way to see some changes is,
1. run the unoptimized app
2. run the scripts (require sudo)
3. reboot your system
4. run the optimized app.

That is because disk caching and the data stored in RAM is still resident so everything will be faster the second time.


比如 sudo sh gnome-optimize 的内容如下,你可以看看它都干了些什么:

显示更多

相关资料:

http://www.gnomefiles.org/app.php/Desktop_Optimization
http://ubuntuforums.org/showthread.php?t=184432
https://wiki.ubuntu.com/Optimization

Popularity: 9% [?]

Tags: , , , , , , ,
ad 468x60

No Replies

Feel free to leave a reply using the form below!


Leave a Reply