How to config LDT to support a big number of functions in one doclua file? [message #1771963] |
Fri, 01 September 2017 10:56  |
Eclipse User |
|
|
|
I'm using LDT to develop addons for game Elder Scroll Online. After I converted ESO's latest api documentation to doclua files, the global.doclua file cannot be compiled correctly. If I deleted some function doc snippets(about 200 functions), it can be compile correctly.
Is there any way to config LDT support more functions? There is 2200+ functions in the attached global.doclua file.
|
|
|
|
Re: How to config LDT to support a big number of functions in one doclua file? [message #1778812 is a reply to message #1772003] |
Thu, 21 December 2017 12:44   |
Eclipse User |
|
|
|
I could integrate this in master but your version seems slower (like between 2 and 3 times slower)
Did you notice any performance issue with your fix ?
here the code I use to test that :
local function f1 (t,lines)
setmetatable({lineinfo = "toto", unpack(lines)}, t)
end
local function f2 (t, lines)
local mt = {lineinfo = "toto"}
for i=1,#lines do
t[i]=lines[i]
end
setmetatable(mt, t)
end
local function f3 (t, lines)
local mt = {lineinfo = "toto"}
for i, var in ipairs(lines) do
mt[i]=var
end
setmetatable(mt, t)
end
local function main()
local t = {}
local lines = {}
for var=0, 1000 do
lines[var] = var
end
local b = os.clock()
for i=0, 300000 do
f1(t, lines)
end
local e = os.clock()
print (os.difftime(e,b))
local b = os.clock()
for i=0, 300000 do
f2(t, lines)
end
local e = os.clock()
print (os.difftime(e,b))
end
main()
|
|
|
|
Powered by
FUDForum. Page generated in 0.05342 seconds