On Friday, 15 January 2021 at 18:55:27 UTC, Ola Fosheim Grøstad
wrote:
On Friday, 15 January 2021 at 18:43:44 UTC, Guillaume Piolat
wrote:
Calling collect() isn't very good, it's way better to ensure
the GC heap is relatively small, hence easy to traverse.
You can use -gc=profile for this (noting that things that
can't contain pointer, such as ubyte[], scan way faster than
void[])
Ok, so what you basically say is that the number of pointers to
trace was small, and perhaps also the render thread was not
under GC control?
A small GC heap is sufficient.
There is this blog post where there was a quantitative measure of
the sub-1ms D GC heap size.
http://www.infognition.com/blog/2014/the_real_problem_with_gc_in_d.html
200 KB can be scanned/collected in 1 ms.
Since then the D GC has improved in many ways (multicore,
precise, faster...) that surprisingly have not been publicized
that much ; but probably the suggested realtime heap size is in
the same order of magnitude.
In this 200kb number above, things that can't contain pointers
don't count.