Nasal Loops: Difference between revisions

no edit summary
No edit summary
No edit summary
Line 43: Line 43:
Nasal loops are 'worse' than C++ loops since the former tend to trigger garbage collection more often, which leads in the worst case to an artificially prolonged frame. Some people claim to have had serious issues with Nasal GC.
Nasal loops are 'worse' than C++ loops since the former tend to trigger garbage collection more often, which leads in the worst case to an artificially prolonged frame. Some people claim to have had serious issues with Nasal GC.


it is entirely true that ANY Nasal code, including loops, may end up triggering the GC - even due to code unrelated to the loop itself, what we commonly referred to as "GC pressure", i.e. due to certain coding constructs being more likely to add to the "GC pressure".
It is entirely true that ANY Nasal code, including loops, may end up triggering the GC - even due to code unrelated to the loop itself, what we commonly referred to as "GC pressure", i.e. due to certain coding constructs being more likely to add to the "GC pressure".


C++ loops should normally not trigger the Nasal GC at all, unless the C++ code happens to call back into Nasal space.
C++ loops should normally not trigger the Nasal GC at all, unless the C++ code happens to call back into Nasal space.