lucene-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Michal Makarewicz <>
Subject Exception encountered when using expressions module with very large expressions.
Date Tue, 29 Jan 2019 23:32:44 GMT

We have a scenario where we use Javascript expression compiler to
dynamically load ranking model passed as query parameter. This approach
works well enough for small models, but when we tried loading large models
using expressions module we hit JVM limit on maximum method size (64kb) and
failed with exception as follows:

hit exception: java.lang.RuntimeException: Method code too large!

at org.objectweb.asm.MethodWriter.a(Unknown Source)

at org.objectweb.asm.ClassWriter.toByteArray(Unknown Source)



I was wondering if anyone encountered this limitation and how to work
around it. Currently my best guess would be to either split the expression
into multiple compilation unit, or create less performant version of
expression compiler that would build an AST to be executed later, instead
of directly creating JVM bytecode.

Any input on how to go about doing it would be highly appreciated.

Thank you,

Michal Makarewicz

  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message