Eclipse cannot clear build performance

I have an Eclipse working set (4.4.1), consisting of ~ 60 projects (the number may be relevant, since it takes time to update the workspace). Sometimes I encounter build failures because Eclipse cannot clear the output folder before the build:

Eclipse build problem

It turned out that the process that locks the file is Eclipse itself:

enter image description here

It also turned out that locked files always contain XML content. In particular, if I define resources with the *.foo extension as XML files (through Settings β†’ General β†’ Content Types ), they have a good chance that they will also be blocked as soon as they are copied to the output path.

I thought the problem was caused by the fact that all XML resources are checked automatically:

enter image description here

- so I added exception filters 1 and even completely turned off XML / XSD checking. The problem has ceased to occur often, but still appears from time to time. Updating or closing-reopening a project is not recommended.

The only way is to restart Eclipse or run Unlocker every half hour, which is not very convenient.

Any ideas how to solve, or at least diagnose it even more?

+6
source share
5 answers

Only my 2 cents.

Perhaps you can fix this problem by following these steps:

  • Project β†’ Properties β†’ Builders β†’ New β†’ Program
  • Define a custom β€œclean” program, such as Unlocker or your own Java or CMD script
  • Move your own builder up. He must be the first Builder on the list.

PS several times I have similar problems caused by Avira Antivirus Scanner ...

+3
source

Disable third-party version control daemons. (Like TGitCache).

They block resources for a short time and are not visible in Process Explorer, but are the most common causes of such failures.

+2
source

Assuming XML validation is the main cause of your problem, I suggest that you expand your search for validation points in your project configuration to highlight all of them:

  • General Settings / Verification
  • General preferences / XML / XML files / Validation (the option "read all schemes" may cause a delay in validation)
  • Preferences / check of the project (check them, perhaps override the general settings)
  • Project Preferences / Builders / Validator

Hope this helps.

+1
source

I am having similar problems. Yes, the number of projects is probably the reason. Close projects that are not in use. If this cleans things up, the moving groups of the related project with individual workspaces will help you.

ie File-> Close project

+1
source

I am not familiar with the problem, but I would solve the problem this way:

  • download file leak detector
  • add the path to your eclipse.ini (e.g. -javaagent: path / to / file-leak-detector.jar = http = 19999, see the documentation on file leak detector)
  • when the problem recurs, see which class (eclipse) is responsible for storing the file descriptor
  • Find out what is the purpose of the class that contains the handle

That way, maybe you can bind the Eclipse function that causes your problem.

+1
source

Source: https://habr.com/ru/post/977409/