diff options
author | David Walter Seikel | 2014-08-14 14:11:58 +1000 |
---|---|---|
committer | David Walter Seikel | 2014-08-14 14:11:58 +1000 |
commit | ab6b1318f3dd335ef49aa46146c43a51037675b7 (patch) | |
tree | 1946581d4452a07bce1fb400d3b729af70597fda /src/libraries | |
parent | Use the new message saving stuff in the parser as well. (diff) | |
download | SledjHamr-ab6b1318f3dd335ef49aa46146c43a51037675b7.zip SledjHamr-ab6b1318f3dd335ef49aa46146c43a51037675b7.tar.gz SledjHamr-ab6b1318f3dd335ef49aa46146c43a51037675b7.tar.bz2 SledjHamr-ab6b1318f3dd335ef49aa46146c43a51037675b7.tar.xz |
Clean up the compiler output. Threaded compiling is much faster when it's not outputting to the console.
Diffstat (limited to 'src/libraries')
-rw-r--r-- | src/libraries/Runnr.c | 8 |
1 files changed, 7 insertions, 1 deletions
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) | |||
442 | if (err) | 442 | if (err) |
443 | { | 443 | { |
444 | compiler->bugCount++; | 444 | compiler->bugCount++; |
445 | #if COMPILE_OUTPUT | ||
445 | if (LUA_ERRSYNTAX == err) | 446 | if (LUA_ERRSYNTAX == err) |
446 | printf("Lua syntax error in %s: %s\n", name, lua_tostring(L, -1)); | 447 | printf("Lua syntax error in %s: %s\n", name, lua_tostring(L, -1)); |
447 | else if (LUA_ERRFILE == err) | 448 | else if (LUA_ERRFILE == err) |
448 | printf("Lua compile file error in %s: %s\n", name, lua_tostring(L, -1)); | 449 | printf("Lua compile file error in %s: %s\n", name, lua_tostring(L, -1)); |
449 | else if (LUA_ERRMEM == err) | 450 | else if (LUA_ERRMEM == err) |
450 | printf("Lua compile memory allocation error in %s: %s\n", name, lua_tostring(L, -1)); | 451 | printf("Lua compile memory allocation error in %s: %s\n", name, lua_tostring(L, -1)); |
452 | #endif | ||
451 | } | 453 | } |
452 | else | 454 | else |
453 | { | 455 | { |
@@ -480,11 +482,15 @@ static void _compileThread(void *data, Ecore_Thread *thread) | |||
480 | else | 482 | else |
481 | { | 483 | { |
482 | compiler->bugCount++; | 484 | compiler->bugCount++; |
485 | #if COMPILE_OUTPUT | ||
483 | printf("Nothing for Lua to compile!\n"); | 486 | printf("Nothing for Lua to compile!\n"); |
487 | #endif | ||
484 | } | 488 | } |
485 | } | 489 | } |
486 | 490 | ||
487 | // TODO - Threaded version is consistantly about half the speed. WTF? | 491 | // Speed tests scripts per second - Threaded Unthreaded |
492 | // 900 - 1400 750 - 800 | ||
493 | // But with outputting to the console - 450 - 700 750 - 800 | ||
488 | void compileScript(LuaCompiler *compiler, int threadIt) | 494 | void compileScript(LuaCompiler *compiler, int threadIt) |
489 | { | 495 | { |
490 | if (threadIt) | 496 | if (threadIt) |