Closed chrisrueger closed 2 weeks ago
Reason seems to be that JARTreePage.update()
is called two times in different threads.
And because stuff is happening in a backgroud Job
JAREditor.background("Reading zip file", monitor -> {
I was able to fix it by avoiding a background job when the jar is loaded: so basically removing the outer
JAREditor.background("Reading zip file", monitor -> {
and just do the stuff inside in the main / display thread. Now only one folder is created.
Performance wise I do not notice a difference. The jar opens instantly just as before. Maybe even faster, because only one temp folder is created , thus less work.
Not sure how this is "good" or "bad" in Eclipse. I personally don't know what would be bad to open the jar in the Display thread. I mean, it is like "I want to open that file, and of course I am willing to wait until it is opened".
I will do some more testing and maybe push the PR later.
@pkriens any opinion?
The issue is that some jar files > 50Mb and that will be noticeable. (Or at least it used to be.)
Problem
I noticed the following behavior recently in 7.1.0.SNAPSHOT where I am opening a lot of jar files to verify stuff.
This creates 2 temp folders
Expected result: Both temp folders from the 1st screenshot should have been removed. Also ending Eclipse does not remove anything.
I searched other related issues, but not sure if one of it is related. Here is the search result: https://github.com/bndtools/bnd/issues?q=is%3Aissue+bndtoolsjareditortempfiles+is%3Aclosed