[Date Prev][Date Next][Thread Prev][Thread Next]
[Date Index]
[Thread Index]
- Subject: Re: changes in 'require'
- From: Diego Nehab <diego@...>
- Date: Wed, 13 Jul 2005 14:10:41 -0400 (EDT)
Hi,
So, it does have an impact (mainly because, with the obvious
implementation, you have to pay it even when requiring an already loaded
module).
What if you implement the parent search as another loader (that always
fails), and place it in the middle of the loaders list?
loaders = {
load_Preload,
load_C,
load_Lua
load_ParentSearch,
load_Preload,
}
That way the cost will only be paid on first failure. No if's. No cost
for modules that are already loaded.
Regards,
Diego.