Details
-
Bug
-
Status: Open
-
Major
-
Resolution: Unresolved
-
None
-
None
-
None
-
None
Description
Currently Drill uses two Java compilers: Janino when code size is <256K, JDK compiler if source code size > 256K.
However, recently I notice that for large source code(~550K), while JDK compiler seems 30% faster in compiling, the generated code is 20% larger and the execution is much slower(10 times slower in some cases):
2016-07-07 21:17:32,647 [28813914-36f3-8bf5-5d4b-7de2daba5341:frag:0:0] DEBUG o.a.d.exec.compile.JDKClassCompiler - Compiling (source size=654.7 KiB):
2016-07-07 21:17:48,806 [28813914-36f3-8bf5-5d4b-7de2daba5341:frag:0:0] DEBUG o.a.d.exec.compile.ClassTransformer - Done compiling (bytecode size=300.6 KiB, time:16165 millis).
2016-07-07 21:23:52,389 [2881379e-5ebf-966d-c099-f813f9f99ab4:frag:0:0] DEBUG o.a.d.e.compile.JaninoClassCompiler - Compiling (source size=654.7 KiB):
2016-07-07 21:24:14,584 [2881379e-5ebf-966d-c099-f813f9f99ab4:frag:0:0] DEBUG o.a.d.exec.compile.ClassTransformer - Done compiling (bytecode size=241.8 KiB, time:22222 millis).
Seems we should stick to one compiler: Janino only. And we should measure and root cause the performance difference of these two compilers especially for large queries.