Re: [Lubuntu-desktop] Use a database in lsc

2011-09-06 Thread Stefano
ok, i'm looking into sqlite3, but if the db should be for all the user we need permission to write in a system folder. how to make a cache? it think that something like: if not package in cache: packages.append([ pkginfo1 pkginfo2 pkginfo3 ... ]) else: pass can work.

[Lubuntu-desktop] Use a database in lsc

2011-09-05 Thread Stefano
i was thinking about the use of a database, re-builded every time the cache update or upgrade, this because parse the contents of a directory(/usr/share/app-install/desktop) is very slow, so we can build the database parsing the directory only the first time, then parse the database to get the

Re: [Lubuntu-desktop] Use a database in lsc

2011-09-05 Thread Ruslan N. Marchenko
Hi Stefano, Something like GDBM hashes or sqlite SQL backend should be ok I presume, however making hard dep to some RDBMS (even mysql) is an overkill as per my opinion. Cheers, Ruslan 2011/9/5 Stefano eco.st...@fastwebnet.it: i was thinking about the use of a database, re-builded every time

Re: [Lubuntu-desktop] Use a database in lsc

2011-09-05 Thread Julien Lavergne
On 09/05/2011 01:20 PM, Stefano wrote: i was thinking about the use of a database, re-builded every time the cache update or upgrade, this because parse the contents of a directory(/usr/share/app-install/desktop) is very slow, so we can build the database parsing the directory only the first

Re: [Lubuntu-desktop] Use a database in lsc

2011-09-05 Thread PCMan
It's a good idea. Please don't use gdbm. It's performance is not good. For a simple and lightweight hash db, you can consider tdb, which is used by samba. If you want more advanced query, then sqlite is the best choice IMO. A nice idea is using locale specific cache since most parts of of a