Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Archived » Lua Development Tools » How to config LDT to support a big number of functions in one doclua file?
How to config LDT to support a big number of functions in one doclua file? [message #1771963] Fri, 01 September 2017 14:56 Go to next message
cloudor Mising name is currently offline cloudor Mising nameFriend
Messages: 34
Registered: July 2009
Member
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 #1772003 is a reply to message #1771963] Sun, 03 September 2017 14:57 Go to previous messageGo to next message
cloudor Mising name is currently offline cloudor Mising nameFriend
Messages: 34
Registered: July 2009
Member
I have fixed this bug by modifying file lib/metalua/grammer/lexer.lua in plugin org.eclipse.ldt.metalua.
The new lexer.lua has been attached.
  • Attachment: lexer.lua
    (Size: 25.29KB, Downloaded 181 times)
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 17:44 Go to previous messageGo to next message
Simon Bernard is currently offline Simon BernardFriend
Messages: 345
Registered: July 2009
Senior Member
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()
Re: How to config LDT to support a big number of functions in one doclua file? [message #1779544 is a reply to message #1778812] Tue, 09 January 2018 13:21 Go to previous message
Simon Bernard is currently offline Simon BernardFriend
Messages: 345
Registered: July 2009
Senior Member
This fix should solve the problem : https://git.eclipse.org/c/ldt/org.eclipse.ldt.git/commit/?id=daa8a14b61a983f518804cf8a15eecf7b2e844c8

It is available in the milestones release 1.4.2RC1 and should be available in the next eclipse release (eclipse photon)
Previous Topic:Range-based indenting?
Next Topic:Code completion - missing features?
Goto Forum:
  


Current Time: Thu Apr 25 00:54:24 GMT 2024

Powered by FUDForum. Page generated in 0.03268 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top