pdt icon indicating copy to clipboard operation
pdt copied to clipboard

Remove the "Build project" entry from the project explorer context menu

Open pounard opened this issue 3 years ago • 7 comments

"Build project" option from Eclipse doesn't really make sense for most PHP projects. And when we trigger it, the operation is blocking and prevent using the IDE until it finishes.

Problem is that, on large projects, even with a more than decent and more than recent machine (i.e. a nice core i7 with 16 go of RAM, and a beefed-up Eclipse configuration for using much RAM) this operation can take up to 20~30 minutes, using all CPU cores and making the machine lag (it happened to me right now).

Aside the fact that it forces me to do an intellectual break from my code (which is not a bad thing) and the fact that it's so long I decided to take some time to write this issue, it's quite annoying mostly.

I have no idea why it's so slow, but in the many tasks it does, between a full PHP code re-indexing (it seems at least) and validating all HTML files it finds (and sadly, last time I accidentally triggered it, I had some coverage HTML report files, a huge HTML report).

Fact is, it actually happens a lot, accidentally triggering this feature, either by misclicking it in the contextual menu, or by accidentally typing the keyboard shortcut for it (yes, it happens to me a lot).

When Eclipse doesn't crash on the most extreme projects I work with, I have to wait for 20~30 minutes before being able reusing my IDE.

Is there a way to either:

  • completely disable this feature for PHP projects ?
  • or fine tune it to make it much faster and less resources consuming ?

Thanks. in advance.

pounard avatar May 26 '21 12:05 pounard

In general this process do multiple things:

  1. Provoke indexing
  2. Syntax validation (PHP, CSS, JSON etc...)
  3. Semantic validation (variables, class/trait/inteface) etc..
  4. Task list like @TODO

Problem is because after crash, eclipse by default invalidate everything especially index.

Build is also required after outside project change (like composer install) due DLTK bug. Once DLTK will be completely removed will be more stable

zulus avatar May 26 '21 13:05 zulus

Isn't it the same as ProjectClean...?

immagine

mlocati avatar May 26 '21 13:05 mlocati

My main issue with it is that in most cases, I trigger it accidentally when it's not required. If the process was less consuming it wouldn't be a problem. Or if it was harder to trigger it accidentally it would be a nice thing as well.

When I create or import a new project, the build is done in background, which allows me to use the editor UI, even if all features aren't ready yet. Manually triggering the rebuild (by accident or not) freezes the UI and is processed in the foreground, locking the user out of the IDE.

pounard avatar May 26 '21 13:05 pounard

What about changing the keyboard shortcut from Ctrl+B to Left Shift+Right Shift+Ctrl+Alt+AltGr+Sing a specific song+B ? 🤣

mlocati avatar May 26 '21 13:05 mlocati

Isn't it the same as ProjectClean...?

No, clean is additional step.

Normally this button provoke "incremental build" (file changes since last build only), but when you disable auto-build it's mostly "full build" (all files).

zulus avatar May 26 '21 14:05 zulus

Normally this button provoke "incremental build" (file changes since last build only), but when you disable auto-build it's mostly "full build" (all files).

Rebuild doesn't clear all and do a full rebuild ?

pounard avatar May 26 '21 14:05 pounard

Rebuild doesn't clear all and do a full rebuild ?

Yeah, but most of builders have 3 different scenarios for clean/full/incremental builds.

Anyway problem is different. Any build operation locks DLTK and WTP, editor (and entire eclipse) is mostly useless.

zulus avatar May 26 '21 14:05 zulus