[Date Prev][Date Next][Thread Prev][Thread Next]
[Date Index]
[Thread Index]
- Subject: Debug hooks and the "line" string
- From: "Ivan-Assen Ivanov" <ivanassen@...>
- Date: Tue, 13 Mar 2007 19:30:56 +0200
The function luaS_newlstr showed up on the profiler
in a significant way, so I decided to investigate what strings are being
created in our game. To my great surprise, it turned out that
nearly 70% of the calls to this function are for the string "line" and
come from the debug hook function (hookf in ldblib.c) which calls our
own hook function and uses the string "line" to indicate which of the
event types has occured.
Is it possible for these strings used for debug events to be pre-allocated
in some way, similar to how the metatable predefined keys are
preallocated in luaT_init?
Best regards,
Assen