Hi all,

people have several times complained about useless access calls in
strace logs. The problem is that a successful call in
portdbapi.findname2 is cached by aux_get, but a failed is not.

This patch works around this by adding a cache for findname2.
This gives a speed up of about 5% compared to current master.

The real problem is that the resolver calls aux_get for a given
cpv for each existing repo. That's because portdbapi.cp_list returns
only cpvs without telling the caller to which repo it belongs.
Fixing that properly would require quite some work on the portdbapi
class.

There was the complaint that instead of writing the caching myself
I should be using a memoization decorator. Unfortunately nobody could
suggest a good implementation with proper license to use. If someone
knows one, let me know.

- Sebastian



Reply via email to