lua-users home
lua-l archive

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


Hi,

getting the filename and current line number is pretty fast.

Good.

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 ;)

David