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.
Loading
Please register or sign in to comment