Skip to content
Snippets Groups Projects
Commit 56bcfbb5 authored by Georges Racinet's avatar Georges Racinet
Browse files

load_repo: forcing garbage collection every 1000 calls.

For something similar with hgweb, look at changeset ff2370a70fe8
in Mercurial.

Surprisingly, this does not change the memory footprint in our
current investigations (which is just using examples/client.py
with more calls). This means that the regular garbage collector
was able to reap benefits of the parent changeset (calling
`gc.collect()` is supposed to be more aggressive on the oldest
generation).

Still, keeping this as a safety net because our example certainly
wouldn't cover all possible situations

With rates of 100 and 500, the new log lines show us the GC
working, with more to collect at 500 than at 100. But at 1000,
we get back to the same amounts of collected objects and time
spent than with 100. This suggests that this is close to the
natural rate, hence we aren't really harming performance.

In any case, this is a constant, and we could make it more
configurable if needed.
parent 73abd75e
No related branches found
No related tags found
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment