# Disable Build automatically & change Keyboard Shortcuts - Faster builds, less waiting

**URL:** <https://bnd.discourse.group/t/disable-build-automatically-change-keyboard-shortcuts-faster-builds-less-waiting/196>\
**Category:** TIPS\
**Created:** [December 10, 2021, 11:30pm UTC](https://bnd.discourse.group/t/disable-build-automatically-change-keyboard-shortcuts-faster-builds-less-waiting/196 "2021-12-10T23:30:44Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![chrisrueger](https://yyz2.discourse-cdn.com/free1/user_avatar/bnd.discourse.group/chrisrueger/32/18_2.png) [@chrisrueger](https://bnd.discourse.group/u/chrisrueger)\
**Post date:** [December 10, 2021, 11:30pm UTC](https://bnd.discourse.group/t/disable-build-automatically-change-keyboard-shortcuts-faster-builds-less-waiting/196/1 "2021-12-10T23:30:44Z")

</div>

Resulting from discussions like [this](https://github.com/bndtools/bnd/pull/4986#issuecomment-988744845) or [this](https://github.com/bndtools/bnd/issues/3175) by and with @kriegfrj I came up with something I’d like to share.

## I disabled Build automatically and changed default eclipse keyboard shortcuts for building the current project manually

- Build Project: **Command + B**
- Build all: **Shift + Command + B**

**Environment:**

- MacOS
- Eclipse 2021-12
- bndtools 6.1.0

 ![image](https://global.discourse-cdn.com/free1/uploads/bnd/original/1X/09b56331a7684ce126c26fc12318b684c371e314.png)

 ![image](https://global.discourse-cdn.com/free1/uploads/bnd/original/1X/05a7606274f178cc9863366b0a5a454c50deeae8.jpeg)

**What will happen with the changes above?**

- From now I build manually by pressing **Cmd + B** (MacOS) after each change. I do that almost automatically like **Command + S** for saving a file.
- only the current bundle is rebuilt, the .jar is created in _generated_ folder and even automatically redeployed when the application is currently running (allows live coding in some cases).. so changes might become visible right away.
- _Project / Build automatically = disabled_ **avoids** rebuild of 50 other dependent bundles automatically after such a change.

## What problem does it solve?

Slow build speed in Eclipse by bndtools builder when saving e.g. MyCoreUtils.java file in a Bundle on which a lot of other bundles depend on.  
With **Build automatically enabled** a single change in a bundle in the root of the dependecy chain causes a rebuild + packaging / creation of the .jar of 50+ other bundles.  
But I have just changed e.g. just a logging statement… No method signature, no interface… This causes regular CPU spikes and UI freezes… basically a lot of waiting.

## What is a drawback of this approach / workaround above?

Of course a rebuild of a single bundle can lead to the problem that things go out-of-sync e.g. if you add new interface methods etc.

In that case I do a full build from time to time using Build all: **Shift + Command + B**

## Conclusion

This little change of habit increases my productivity a lot until there is some progress in tickets like [this](https://github.com/bndtools/bnd/issues/3175).

Any feedback?  
Anybody else doing something similar?  
Or is it plain crazy 😉

Have fun 🙂

---

<div class="post-metadata">

**Author:** ![kriegfrj](https://yyz2.discourse-cdn.com/free1/user_avatar/bnd.discourse.group/kriegfrj/32/24_2.png) [@kriegfrj](https://bnd.discourse.group/u/kriegfrj)\
**Post date:** [December 11, 2021, 1:37pm UTC](https://bnd.discourse.group/t/disable-build-automatically-change-keyboard-shortcuts-faster-builds-less-waiting/196/2 "2021-12-11T13:37:17Z")

</div>

I once experimented with disabling “build automatically”, and relying on the automatic “build before launch”. However, your approach seems more practical when doing hot-coding on an instance that’s already running. I’ll have to give it a try!

---

<div class="post-metadata">

**Author:** ![chrisrueger](https://yyz2.discourse-cdn.com/free1/user_avatar/bnd.discourse.group/chrisrueger/32/18_2.png) [@chrisrueger](https://bnd.discourse.group/u/chrisrueger)\
**Post date:** [December 11, 2021, 10:15pm UTC](https://bnd.discourse.group/t/disable-build-automatically-change-keyboard-shortcuts-faster-builds-less-waiting/196/3 "2021-12-11T22:15:35Z")

</div>

Here is slight optimization of my approach:

- I enabled the option _Save automatically before manual build_

 ![image](https://global.discourse-cdn.com/free1/uploads/bnd/original/1X/3b7245649d0567eabe1cfdba4ab50632ef761b6f.png)

**Advantage:** I only need to press Build Project: **Command + B** which saves the _current file_ and then a builds the _current project_ (instead of **Command + S** and **Command + B** ).

I noticed that I sometimes saved the file but forgot to build project. Now I just have to force myself to forget about **Command + S** , and only use **Command + B** which does both.
