On Saturday, 28 November 2015 at 02:37:40 UTC, Marco Leise wrote:
We can probably agree that we don't know about the impact on a
large multimedia application written in D. What you can
communicate is: Create a @nogc thread routine and don't
register it with the GC to write real-time VSTs.
Guillaume did a good job, taking the GC out of the real-time
thread. It's D, it is a bit of a hack, it's the correct way to
do it and works. But I don't see it debunking any myths about
GC and real time...
A) It doesn't mix them to begin with.
B) "Realtime GCs" are a thing. D's GC is not optimized for
such a use case.
C) With a small heap it doesn't matter. (We need more complex
multimedia projects.)
But the claim we hear on Internet forums is:
- "can't do realtime with a GC language" (wat)
- "GC leads to GC pauses" (only if you let them happen)
Which is imho a shortcut.
What I've seen is a program, a non-linear video editor, called
PowerDirector that pauses for seconds every now and then. These
pauses reminded me a lot of GC pauses, but I can't be sure.
Although memory use is less after the pause, it could also be a
cleaning of caches. In any case quite a few of these
applications try to make "good use" of available RAM, causing
constant memory pressure.
I've seen my share of GC pauses and they did annoy me.
In some language like Javascript they are very hard to avoid.
However here I'd say it's a PowerDirector problem, not a GC
problem.
Now there has been so much talk about the GC that I don't even
know what the filter does!
Reason enough not to write a blog post for me :). I'm not in a
crusade.