lua-users home
lua-l archive

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


Glenn McAllister wrote:
Luiz Henrique de Figueiredo wrote:
There is a limit in the number of constants in a single source file set
at 2^18.

Actually, the limit is per function. So you could do something like this:

T={}
f=function (T)
    -- populate some entries of T
end
f()

f=function (T)
    -- populate some some entries of T
end
f()
...

This and the CSV format are reasonable suggestions. I'll probably do it this way, just so I don't have to write something to transform the CSV format.

BTW, in case anyone is wondering why I'm doing this, its to get the key information out so I can then use it later to fetch data from a "cold" database that doesn't already have the data in cache (its own or the operating systems) so I can get some pessimistic timing data.

Thanks to Jermoe and Luiz for pointing out the problem and solution.


As a final follow up, I implemented the technique Luiz proposed and it works like a charm. Thanks again.

--
Glenn McAllister     <glenn@somanetworks.com>      +1 416 348 1594
SOMA Networks, Inc.  http://www.somanetworks.com/  +1 416 977 1414

  Asking a writer what he thinks about criticism is like asking a
  lamppost what it feels about dogs.
                                                    - John Osborne