Optimization

Summary

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.

Rationale

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.

Scope

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.

Design

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.

Implementation

The optimized XML metadata should be preshipped with the application who uses it.

Benchmarks

No benchmark data had yet been produce, I would like to ask for community members for help.

Code

Code

Application

Affected

rhythmbox-quickstart

Rhythmbox

XML files in rhythmbox_database_dir="$HOME/.gnome2/rhythmbox"

evolution-optimize

Evolution Groupware

XML files in evolution_libdir="/usr/lib/evolution" evolution_sharedir="/usr/share/evolution"

openoffice-optimizer

OpenOffice.org 2

XML files in openoffice_dir="/usr/lib/openoffice".

gnome-optimize

GDM, SVG themes, Mime

XML files in themes_dir="/usr/share/themes" icons_dir="/usr/share/icons" gdm_dir="/usr/share/gdm" pixmaps_dir="/usr/share/pixmaps" mime_dir="/usr/share/mime"

gconf-optimize

Gconf

XML files in gconf_share_dir="/usr/share/gconf" gconf_etc_dir="/etc/gconf" gconf_home_gnome_dir="$HOME/.gnome2" gconf_home_gconf_dir="$HOME/.gconf"

doc-optimize

Shared documents, Yelp

XML files in doc_dir="/usr/share/doc" yelp_dir="/usr/share/yelp"

Data preservation and migration

Outstanding issues

Since the XML files are compacted, human readability of those metadata will be affected. We should check if the gain in performance makes up the loss in human readability.

BoF agenda and discussion

Benchmark the results.

  • One alternative to correct the draw back of human readability would be to create a Universal Metadata Reader Applet, something that could be used individually to read Document Metadata but also could be integrated into the desktop search bar in the future for searching document Metadata through a call out within the individual applet. Since the XML files are compacted, human readability of those metadata will be affected. We should check if the gain in performance makes up the loss in human readability


CategorySpec

Optimization (last edited 2008-08-06 16:33:58 by localhost)