1 |
Hi all, |
2 |
|
3 |
people have several times complained about useless access calls in |
4 |
strace logs. The problem is that a successful call in |
5 |
portdbapi.findname2 is cached by aux_get, but a failed is not. |
6 |
|
7 |
This patch works around this by adding a cache for findname2. |
8 |
This gives a speed up of about 5% compared to current master. |
9 |
|
10 |
The real problem is that the resolver calls aux_get for a given |
11 |
cpv for each existing repo. That's because portdbapi.cp_list returns |
12 |
only cpvs without telling the caller to which repo it belongs. |
13 |
Fixing that properly would require quite some work on the portdbapi |
14 |
class. |
15 |
|
16 |
There was the complaint that instead of writing the caching myself |
17 |
I should be using a memoization decorator. Unfortunately nobody could |
18 |
suggest a good implementation with proper license to use. If someone |
19 |
knows one, let me know. |
20 |
|
21 |
- Sebastian |