Try to limit resource usage

Third try on #196 / #197.

Try to use some metric which is independent of current system load (count expensive render calls, allocations in context scopes and render output lengths).

Benchmarks will follow.

Ping @boourns @burke