[Date Prev][Date Next][Thread Prev][Thread Next]
- Subject: Re: Performance hit of accessing the Lua stack
- From: David Anderson <david.anderson@...>
- Date: Sun, 27 Mar 2005 03:50:29 +0200
getting the filename and current line number is pretty fast.
But how much does speed matter in a debugging function?
That's the whole point: the function I'd be using lua_getstack et al. in
isn't a debugging function. It's a wrapper to the logging function
through which everything loggy from "Loading universe", to "Frob value
is 42", to "Fatal error, crashing out", goes through. Barring
optimisations, the stack would be queried once for each and every line
that goes to the log from the lua code.
That's why I'm worried about the speed of querying the stack and
extracting file/line info. All other debugging functions can be as slow
as they want, I'll only be using them for real debugging ;)