[Ubuntu-PH] Re: Rhythmbox Quickstarter
Joel Bryan T. Juliano
joelbryan.juliano at gmail.com
Wed May 10 17:50:08 UTC 2006
On Wed, 2006-05-10 at 17:38 +0200, Christophe Augier wrote:
> 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
>
I comment them for checking the outputs, but I agree that it should just
create only the necessary files. I have attached the new version.
> 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.
>
by optimizing the input before it can be parse is a big performance gain
for alot of applications, since alot of them are using XML. libxml2
should have that feature.
> cheers,
>
> - Christophe
>
> On 5/10/06, Joel Bryan T. Juliano <joelbryan.juliano at gmail.com> 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 <joelbryan.juliano at gmail.com>
> >
> >
> > -----BEGIN PGP SIGNATURE-----
> > Version: GnuPG v1.4.2.2 (GNU/Linux)
> >
> > iD8DBQBEYdSw5tf3ds5t46cRAl7tAJ95zWO05R6QHR6MVD3sLar30ulRfQCffbnf
> > aNdcGGpOkzPvJZ0AlYCDXDU=
> > =439A
> > -----END PGP SIGNATURE-----
> >
> >
> > --
> > ubuntu-devel mailing list
> > ubuntu-devel at lists.ubuntu.com
> > https://lists.ubuntu.com/mailman/listinfo/ubuntu-devel
> >
> >
> >
> >
--
Joel Bryan T. Juliano <joelbryan.juliano at gmail.com>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: rhythmbox-quickstart
Type: application/x-shellscript
Size: 992 bytes
Desc: not available
URL: <https://lists.ubuntu.com/archives/ubuntu-ph/attachments/20060511/e15b0949/attachment-0001.bin>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 191 bytes
Desc: This is a digitally signed message part
URL: <https://lists.ubuntu.com/archives/ubuntu-ph/attachments/20060511/e15b0949/attachment-0001.pgp>
-------------- next part --------------
--
ubuntu-users mailing list
ubuntu-users at lists.ubuntu.com
https://lists.ubuntu.com/mailman/listinfo/ubuntu-users
More information about the ubuntu-ph
mailing list