-
Notifications
You must be signed in to change notification settings - Fork 11
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
ParralelDecompiler Faster? #1
Comments
TBD.. get this error using this code: Exception has occurred: java.lang.InstantiationException
java.lang.InstantiationException: ghidra.app.decompiler.parallel.DecompilerCallback |
Yes. "CPython implementation detail: In CPython, due to the Global Interpreter Lock, only one thread can execute Python code at once (even though certain performance-oriented libraries might overcome this limitation)." source. You should use the Edit: It's pretty cool how it automatically pasted the link for the Global Interpreter Lock. I didn't even notice it until afterwards. |
Thanks for this. In my case, I spin up multiple decompilers and have "multithreaded" python submit each function to several running decompilers, so perhaps the GIL issue is mitigated? I had trouble using pyhidra to instantiate a callback function. callback = DecompilerCallback(program, DecompileConfigurer) Which caused |
|
The GIL "issue" is intentional. What I think is happening is that when a Java function is called, Jpype releases the GIL which then allows another Python thread to acquire the GIL and run Python code. You will have multiple Python threads, I think, you just can't run Python code in multiple threads at the same time in the same Python process/interpreter/whatever. |
I have been trying to keep it strictly python, but in this case would I need to implement the subclass as a plugin? Pyhidra does has some support to include a plugin, but I have yet to wrap my head around it. edit: Understanding that it would need to be subclassed in Java, what is the best way to implement it? A plugin, or some 1-off jpype command like |
I don't know which would be best here. I'd say to just do whatever you feel is easiest. If there's not a severe problem as it currently is then I honestly wouldn't worry about it. If it ain't broke, don't fix it. |
Instead of using python threading, would it be faster to use ParallelDecompiler?
The text was updated successfully, but these errors were encountered: