[Date Prev][Date Next][Thread Prev][Thread Next]
[Date Index]
[Thread Index]
- Subject: hooks or something hook like
- From: eugeny gladkih <john@...>
- Date: Thu, 09 Feb 2006 12:19:44 +0300
Hi,
the prelude - we're using Lua as a scripting language of our
embedded web-server. the problem is there are a lot of short
living and somtimes big enough scripts loading very often. that
is performance problem. we've written file cache wich holds the
source of used Lua scripts ant their compiled representation
dumped just after loading. it sounds to be good, but the most
scripts use 'require'. well, we've written 'require'
replacement. it's easy, 'cuz we dont't use 'dofile' or something
like that. so, everything seems to be going well. but... I'm
thinking about Lua 5.1 integration into our software. there is
new packaging strategy, new 'require', I guess, and maybe
something else changed, too. It's not right way to hack
everytime the standard library and VM.
the better way is having the hook which should be called from
VM/libraries when they need the file be loaded I guess. And the
coolest feature is the possibility to write that hook in Lua
itself :) does anybody agree with me?
--
Yours sincerely, Eugeny.
Doctor Web, Ltd. http://www.drweb.com