Debugging can be unusable due to memory usage in 5.3.x

Any plans to address the memory usage of debugging logging for 5.3.x?

At the moment, I’m finding the debugging in 5.3 completely unusable due to memory usage, always running out of memory and GC errors, which never happened with 5.2

https://luceeserver.atlassian.net/browse/LDEV-2049

The problem I think is that everything is being logged per request, regardless of the debug settings, including the application scope which may be quite sizeable depending on the application and the whole page stacktrace, which depending on the framework can also be quite large (especially on (re)-init).

There is a partial PR (Fix for LDEV-2049 by cfmitrah · Pull Request #598 · lucee/Lucee · GitHub) to simply stop displaying them in the debug template, but this doesn’t address the underlying memory usage problem.

Ideally, if a debugging feature is disabled, the related data shouldn’t be logged. Being able to disable logging specific scopes is quite important.

I made a quick script to show the memory usage per debug request log which you can see here
https://luceeserver.atlassian.net/secure/attachment/26342/mem-v2.zip (you need to enter your admin password to the cfadmin tag, but not always which is seems kind of quirky)

Also being able to limit debugging by memory used, rather than just the number of requests might help
https://luceeserver.atlassian.net/projects/LDEV/issues/LDEV-2106