Hi,

i'm quite confused by your script. Your repeting some operations with
sed and thus create more files than it is needed. Why don't you use a
single sed pipe with sequential commands such as :

sed -e '/^[ \t]*$/d;s,^[ \t]*,,;s,>[ \t]*<,><,g;s,[ \t]*$,,' > tmpfile.xml

and then use the 'tr' command on tmpfile.xml

(sorry if i'm using ',' instead of '/' as the substitution command delimiters)

I did not test the performance issue, but i feel it's definitly an
improvement to decrease from 30 seconds to just a few.

I'm also wondering, why we need to do that? Can't rhythmbox generates
an already 'optimized' file? I quickly checked and couldn't find such
feature in libxml2.

cheers,

- Christophe

On 5/10/06, Joel Bryan T. Juliano <[EMAIL PROTECTED]> wrote:
Hi, I made a simple script to quickstart rhythmbox by optimizing it's
XML database.

The script is just a basic optimizer for XML & HTML.
It can be used to any HTML & XML files.

I restart the system to check the difference of
non-optimized and optimized database.

I have 7814 songs, and The difference is when it's non-optimized,
rhythmbox will start loading the songs, counting 2 digits, (i.e. 40, 46,
49....7814) for 30 seconds or so, but when it's optimized, the counting
will skip to 3 digits to 4 digits in just seconds, (i.e. 146, 300,
615....7814), and rhythmbox starts much faster.

Rhythmbox will reformat the XML, so the script will be needed to run
again. I think it's good to run the script at startup because once
rhythmbox had been loaded, it'll be much faster, for both optimized and
non-optimized, so re-running the script is a good idea when the cached
memory had been cleared.

a backup of your current databases will be created (rhythmdb_backup.xml,
playlists_backup.xml), so just copy it to the rhythmdb.xml.

The databases are in $HOME/.gnome2/rhythmbox/ directory.

The script is attached in this message, (rhythmbox-quickstart)


JB

--
Joel Bryan T. Juliano <[EMAIL PROTECTED]>


-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.2.2 (GNU/Linux)

iD8DBQBEYdSw5tf3ds5t46cRAl7tAJ95zWO05R6QHR6MVD3sLar30ulRfQCffbnf
aNdcGGpOkzPvJZ0AlYCDXDU=
=439A
-----END PGP SIGNATURE-----


--
ubuntu-devel mailing list
[EMAIL PROTECTED]
https://lists.ubuntu.com/mailman/listinfo/ubuntu-devel





--
ubuntu-users mailing list
[EMAIL PROTECTED]
https://lists.ubuntu.com/mailman/listinfo/ubuntu-users

--
Ubuntu-motu mailing list
[email protected]
https://lists.ubuntu.com/mailman/listinfo/ubuntu-motu

Reply via email to