Merging XAR files

at 2010-01-30 in Examples by kiesel (0 comments)

With the 5.7.7-RELEASE there has a nitfy small feature been added to the xar command: merging multiple XAR files. XAR files are the archives in which XP Framework applications can ship their classes and/or resource files in a way comparable to Java`s .jar-files.

Combining multiple xar files into one can be handy one the one hand, because you can merge all dependencies and the application itself into one single file and only have to provide the one. On the other hand, for applications where startup or I/O performance is a concern, it can be useful: each xar file involved in an application comes with a startup time penalty - the file must be opened, the index must be read before the first file can be retrieved. Here, a single file instead of many files mean increased startup performance and less I/O calls of an application.

This is how it works:


Alex@mobile ~/dev/xp.public/trunk
$ xar cf one.xar ChangeLog

Alex@mobile ~/dev/xp.public/trunk
$ xar cf two.xar skeleton/VERSION=VERSION

Alex@mobile ~/dev/xp.public/trunk
$ xar mf merge.xar one.xar two.xar

Alex@mobile ~/dev/xp.public/trunk
$ xar tvf merge.xar
58.978 ChangeLog
10 VERSION



Subscribe

You can subscribe to the XP framework's news by using RSS syndication.


Categories

News
General
PHP5
Announcements
RFCs
Further reading
Examples
Editorial
EASC
Experiments
Unittests
Databases
5.8-SERIES
Unicode
Language
5.9-SERIES

Related

Find related articles by a search for «Merging».