From ab6b1318f3dd335ef49aa46146c43a51037675b7 Mon Sep 17 00:00:00 2001 From: David Walter Seikel Date: Thu, 14 Aug 2014 14:11:58 +1000 Subject: Clean up the compiler output. Threaded compiling is much faster when it's not outputting to the console. --- src/libraries/Runnr.c | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) (limited to 'src/libraries/Runnr.c') diff --git a/src/libraries/Runnr.c b/src/libraries/Runnr.c index 5fecfdf..fbd4289 100644 --- a/src/libraries/Runnr.c +++ b/src/libraries/Runnr.c @@ -442,12 +442,14 @@ static void _compileThread(void *data, Ecore_Thread *thread) if (err) { compiler->bugCount++; +#if COMPILE_OUTPUT if (LUA_ERRSYNTAX == err) printf("Lua syntax error in %s: %s\n", name, lua_tostring(L, -1)); else if (LUA_ERRFILE == err) printf("Lua compile file error in %s: %s\n", name, lua_tostring(L, -1)); else if (LUA_ERRMEM == err) printf("Lua compile memory allocation error in %s: %s\n", name, lua_tostring(L, -1)); +#endif } else { @@ -480,11 +482,15 @@ static void _compileThread(void *data, Ecore_Thread *thread) else { compiler->bugCount++; +#if COMPILE_OUTPUT printf("Nothing for Lua to compile!\n"); +#endif } } -// TODO - Threaded version is consistantly about half the speed. WTF? +// Speed tests scripts per second - Threaded Unthreaded +// 900 - 1400 750 - 800 +// But with outputting to the console - 450 - 700 750 - 800 void compileScript(LuaCompiler *compiler, int threadIt) { if (threadIt) -- cgit v1.1