softwareCobbler / luceedebug

line debugger for lucee
GNU Lesser General Public License v2.1
44 stars 15 forks source link

Deal with Large Class Files #19

Open jamiejackson opened 1 year ago

jamiejackson commented 1 year ago

Enhancement Opportunity: Consider large class files

In #3, we discovered that large class files were causing server startup to fail, so a workaround was added to ignore large class files.

However, @zspitzer mentioned that Lucee has the ability to split large class files: https://github.com/softwareCobbler/luceedebug/issues/3#issuecomment-1346239396

Could you outline the solution, @zspitzer? Is it all on the Lucee side? How does one enable it and what are the pros and cons?

jamiejackson commented 1 year ago

Info from @zspitzer:

PageSourceImpl._compile() is an internal API that can be called by luceedebug with a split argument of true.

softwareCobbler commented 1 year ago

Recently the instrumentation bytecode count was reduced by one instruction per source code line, so what used to be 4 instructions per line

getstatic <ref to debugmanager>
iload
iload
invokeinterface <debugmanager.step>

is now 3

getstatic <ref to debugmanager>
iload
invokeinterface <debugmanager.step>

Meaning if an instrumented method was just barely over the max, it may possibly now wind up under the max. This is not a total solution to the problem, but maybe a few more files become steppable.