1 |
On Tue, Jan 17, 2006 at 02:01:29AM -0200, Gustavo Sverzut Barbieri wrote: |
2 |
> Hello, |
3 |
> |
4 |
> I admit I have not followed last threads about cache and new |
5 |
> infrastructure (plugins and stuff). |
6 |
|
7 |
Might suggest you take a look at the cache rewrite- it already has a |
8 |
sqlite backend in it, although that's not coded against pysqlite2 |
9 |
(thus it needs some param work). |
10 |
|
11 |
> However I followed the template and coded a SQLite3 (pysqlite2) |
12 |
> backend: http://www.gustavobarbieri.com.br/gentoo/portage_db_sqlite.py |
13 |
|
14 |
Really should fix the 403 if you're looking for comments. |
15 |
|
16 |
Guessing this is against stable... in which case I'd point you at the |
17 |
2.1 line, since the stable cache is now dead from a release standpoint |
18 |
(it'll exist in 2.0.*, but everything beyond is the new cache). |
19 |
|
20 |
> The main problem is that it's really slow to search and calculare |
21 |
> dependencies. Could some developer take a look and tell me where I can |
22 |
> improve it? |
23 |
|
24 |
That's due to portage access patterns- select should be slower then |
25 |
flat_list/flat_hash, and the way portage pulls from the db (namely, |
26 |
key by key) doesn't work incredibly well for an rdbms backend- |
27 |
basically, the api is such that instead of doing a single select, |
28 |
it'll do multiple. |
29 |
|
30 |
> In an ideal world, I wouldn't have to pickle/unpickle data but have |
31 |
> its data in columns instead... one would re-encode the version strings |
32 |
> using a pattern that is comparable by string, so you should be able to |
33 |
> search for a given string or higher versions. |
34 |
|
35 |
Cache rewrite is intended to work towards that- still requires the |
36 |
restriction framework I've got in savior, but gradually working |
37 |
towards that. |
38 |
|
39 |
~harring |