-
Notifications
You must be signed in to change notification settings - Fork 13
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Excessive jshell imports #34
Comments
Thanks for trying out the project, and even more for creating an issue for a problem! I've created the Filling the auto-import list with every class in Ghidra except for the ones that caused problems was an overzealous first approach. I've created a new auto-import list based on the imports used in the scripts included with Ghidra. It cut the auto loading on my jshell instance from 10 seconds to 5. If you want to try it out, you can overwrite the I haven't yet, but I'll add an initializing message and version banner to all of the interpreters, including JShell, which is printed when the interpreter is ready. This should at least give some indication to the user that the input is ready so that it is a little less of a mystery. I haven't seen delays anywhere close to a minute delay with the current list though, which makes me wonder if something else is also happening to impact performance. Can you share any details on which JVM and JDK version you're seeing this on? Is the lag of the You may already know this, but for others seeing this issue it is possible to disable the auto-loading on a per-interpreter basis. You can find the relevant options in the CodeBrowser (Edit->Tool Options) under the "Ruby Dragon Interpeters" section. |
re: startup time. I'm in a full Ghidra eclipse setup. Timing the startup of the tool and putting a "int i =0;" in the REPL to when I got back a REPL response, was 1 min 30 seconds-ish. |
One other suggestion as a stopgap is to make sure that the plugins for the other (non-JShell) interpreters are not enabled if JShell is the only one that you're using. You should see all of them in the File->Configure menu of the CodeBrowser under the "Core" category. You can quickly see which ones are enabled by which ones have icons on the toolbar as well. Some of them create their interpreter and keep state updated regardless of if you've launched them yet. They are not all like that, and I'll change the ones that aren't lazily created to be lazy as part of this change, but in the meantime disabling the others may speed up your browsing experience some. |
The latest release for Ghidra 10.3.3 includes the fixes described above. I have not been able to reproduce the performance issues you described with a Release build of Ghidra. I'll use the plugin with a debug build of Ghidra to see if this reproduces what you're describing and update this issue with the results of that. |
Importing all the class names when you are creating the jshell instance (~2600 classes) causes some severe lag when executing even simple REPL statements (eg. "int i = 0;")
The REPL isn't even responsive for almost a minute after starting up because its processing the evals for currentAddress, etc, which each take several seconds. The async nature of the console make it confusing because your input is accepted, but nothing happens.
Maybe just import a few hand-picked packages?
The text was updated successfully, but these errors were encountered: