Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Archived » Lua Development Tools » Slow debugging
Slow debugging [message #1705141] Wed, 12 August 2015 11:49 Go to next message
Gil Keren is currently offline Gil KerenFriend
Messages: 3
Registered: August 2015
Junior Member
Hello,
recently I installed Lua plugin for eclipse (LDT, formally known as Koneki). Now when I debug my code, it execute it really slow. I mean, some line of code that takes around 5-10 seconds when running without debug, takes around 2 minutes in debug.
any ideas?

Thanks!
Re: Slow debugging [message #1705537 is a reply to message #1705141] Mon, 17 August 2015 12:31 Go to previous messageGo to next message
Simon Bernard is currently offline Simon BernardFriend
Messages: 345
Registered: July 2009
Senior Member
The debugger is very slow, it deserves optimization but nothing is planned for now.
The embedded VM (jnlua) is the slowest way to debug. If you use an external VM with luasocket this should be faster. Using LuaJit could also help to improve the performance.
Re: Slow debugging [message #1705579 is a reply to message #1705537] Mon, 17 August 2015 15:31 Go to previous messageGo to next message
Gil Keren is currently offline Gil KerenFriend
Messages: 3
Registered: August 2015
Junior Member
Thanks for your reply! I am a bit desperate here.
I changed my interpreter to "luajit" but it is still very slow.
What do you mean "use external VM"? everything is local on my laptop...

I should probably mention that initially I could not run or debug Lua in eclipse with the original embedded interpreter, got an error:
Exception in thread "main" com.naef.jnlua.LuaRuntimeException: error loading module 'libpaths' from file '/home/cruvadom/torch/install/lib/lua/5.1/libpaths.so':
/home/cruvadom/torch/install/lib/lua/5.1/libpaths.so: undefined symbol: lua_gettop
at com.naef.jnlua.LuaState.lua_pcall(Native Method)
at com.naef.jnlua.LuaState.call(LuaState.java:555)
at org.eclipse.koneki.ldt.support.lua51.internal.interpreter.JNLua51Launcher.run(JNLua51Launcher.java:128)
at org.eclipse.koneki.ldt.support.lua51.internal.interpreter.JNLua51Launcher.main(JNLua51Launcher.java:143)

Then to make it work I changed my interpreter to qlua, according to: stackoverflow.com/questions/31036340/torch7-lua-error-loading-module-libpaths-linux

Any ideas what to try next?
I can get faster debugging times using ZeroBrane (though still slow), but I still want to use eclipse.

Thanks!
Thanks!
Re: Slow debugging [message #1709252 is a reply to message #1705579] Fri, 25 September 2015 10:02 Go to previous message
Simon Bernard is currently offline Simon BernardFriend
Messages: 345
Registered: July 2009
Senior Member
I think you did what I mean.
When I said external VM, I mean use another one than the JNLua Embedded one.
(The error you mention with embedded intepreter is normal/known, it could have some problems with C module and JNLua interpreter, it is mainly here to have a quick start with the IDE, but not for production)

About the slowness of the LDT debugger. It's a know issue, this is clearly not easy to fix. I have no hope this will be done soon.
Maybe you could try to use the attach to Lua Application mode :https://wiki.eclipse.org/LDT/User_Area/User_Guides/User_Guide_1.3#Attach_session
and do the "require("debugger")(idehost, ideport, idekey)" as near as possible of the code you want to debug. (this means all the time before the "require("debugger")(idehost, ideport, idekey)" was called will be done without the code instrumentation done by the debugger, so at "normal" speed).

Sry to be not able to do more Sad

Simon
Previous Topic:Code Templates User variable with predefined values
Next Topic:Problem with number literals follow-up
Goto Forum:
  


Current Time: Thu Apr 25 21:46:14 GMT 2024

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

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

Back to the top