lua-users home
lua-l archive

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


since opening the file is very expensive compared to actually reading from
it, can you keep the file open?  Then you have much faster access to it.  Or
memorymap the file....

Thinking out loud - if it's stupid, just say so....

Rich

> -----Original Message-----
> From: lua-bounces@bazar2.conectiva.com.br
> [mailto:lua-bounces@bazar2.conectiva.com.br]On Behalf Of Sergey Redin
> Sent: Saturday, January 28, 2006 4:09 PM
> To: lua@bazar2.conectiva.com.br
> Subject: Re: Threads again
>
>
> On Sun, 29 Jan 2006 10:42:27 +1100
> D Burgess <dburgess@gmail.com> wrote:
>
> > Before you do anything else I think you should check to see how
> > long it takes to create a Lua universe. The Lua initialization is v
> > quick.
>
> What about loading a table with a few tens of thousands keys from
> a file every time? I will need some constant database.
>
> I could implement it in another way and provide a C wrapper to get
> the values from it, so this is not so important, though...
>
> But what about actually executing the chunk (creating the functions)
> every time any way? It is OK when the script is 1K but they promise
> to be larger :)
>
> In fact, I will certainly make some tests before actually implementing
> anything, but I would like to know for sure if I can do what I described
> or I must forget about it and think about alternatives.
>
> --
> Regards, Sergey Redin.