[Date Prev][Date Next][Thread Prev][Thread Next]
- Subject: Re: how to load a very large table with more than 2^18 literal strings?
- From: Luiz Henrique de Figueiredo <lhf@...>
- Date: Thu, 6 Aug 2009 14:18:51 -0300
> I'm accustomed to use Lua to store persistent data structures on disk.
> Unfortunately, in my latest venture, I run out of string space. I did
> a little investigation in the source, and it appears that only 2^18
> literal constants may appear in any one source file, and this appears
> to be a hard limit built into the bytecode format.
> I would like to write large Lua tables out to disk, possibly nested, but
> with no sharing or cycles. Does anybody have any suggestions how to
> achieve this without running afoul of the dreaded 'constant table overflow'?
The usual solution for this is to divide your data into functions because
the limit is per function. This has been discussed before: