lua-users home
lua-l archive

[Date Prev][Date Next][Thread Prev][Thread Next] [Date Index] [Thread Index]


Hello,

davidguy@netzero.net wrote:
> My question is, for those who have come up against this,
> how long have you found Lua's GC cycle to take? Fractions
> of a second? Seconds?

This depends on program size, execution profile, cpu power, and so on.  For
an average program on an average machine, certainly a small fraction of a
second.

> Also, is it ok to set the GC threshold very high, so Lua will
> never  perform a GC cycle, then set the threshold to zero('0')
> to forces a  GC cycle, then reset it to very high?

Forcing gc cycles is possible and easy, that's not the problem.  The issue
is if your app is of a hard real-time nature and you can't afford to give up
control to the gc for the duration of a cycle.

-John