Hello,

I have been using IntelliJ with Camel Core and other projects for some time
now.

It's usually easier to load just the specific module you are working on.
However, if you really want to load the entire project ... I can share my
IntelliJ settings, the workflow I use and what has been the user experience
so far.

First, I have configured my system the following way:

OS (Linux):
fs.inotify.max_user_watches=524288

IDE:
Maximum heap: 4Gb

IDE settings:
- Maven Importer (configured on Build, Execution, Deployment -> Build Tools
-> Maven -> Importing):  VM Options for Importer: -Xmx1g
- Shared Indexes (I think it's enabled by default, but make sure it's
enabled and configured): Wait for shared indexes (on), Public Shared
Indexes (download automatically - both JDK and Maven libraries)
- Compiler (configured on Build, Execution, Deployment -> Compiler): make
sure "Build project automatically" is turned off.

With these settings, I even have some plugins like Sonarlint running
automatically on the Camel Core codebase. This plugin performs much better
than the builtin analysis from the IDE for large code bases like Camel.
Running the tests and the debugging feature work flawlessly.

Day-to-day workflow:
- I build the project using maven daemon [1] before launching the IDE to
avoid it from entering the polling loop + indexing for new files
- I avoid using the builtin git commit support from the IDE, as it usually
triggers the builtin analyzer. Instead, I do the commits via git CLI and
the pull requests using the hub CLI [2]
- I use the CLI to build the code/module if necessary. When doing so, I
build only the required module.

I have used settings rather comfortably on the following systems:

- my desktop (a Ryzen 9 3900XT, 32Gb RAM and a 1Tb WD Black SN850 SSD)
running Fedora Linux
- my work laptop (a Lenovo P1 with an i7 9850H , with 32Gb of RAM and nvme
SSD) running Fedora Linux
- my old work laptop (a Lenovo P51 with an i7 6820HQ, with 32Gb of RAM and
nvme SSD) running Fedora Linux
- my personal laptop (an i7 macbook 16" with 16Gb of RAM) running OS X.

Of these, the only one that struggles to handle the load is the MacBook
one. When running with the battery, the indexing and build is enough to
reduce the battery significantly (i.e.: from 100% to 70% or so). When
running on AC, the indexing takes a very long time. So, I don't recommend
(though I am curious to see how an M1 would perform with it).

Some known problems / tips:
- In general, you probably want to avoid IntelliJ indexing as much as
possible.
- About once a month or so, IntelliJ indexing gets corrupted so you have to
invalidate its caches .
- From time to time it's good to remove your local maven cache
($HOME/.m2/repository). The camel artifacts can consume a lot of disk space
there and, over the course of time, it can make IntelliJ indexing very slow
and contribute to the IntelliJ caching issue.

1. https://github.com/mvndaemon/mvnd
2. https://github.com/github/hub

I hope this helps somehow.

Kind regards

On Wed, Oct 13, 2021 at 8:35 PM Claus Ibsen <claus.ib...@gmail.com> wrote:

> Hi
>
> You dont load the entire project.
>
> I launch IDEA from terminal with
>
>    idea .
>
> Or
>
>    idea pom.xml
>
> For the latter, IDEA opens only what I need to work on.
>
> For SB then it can be the core folder to work on all core modules, or
> for a starter you can open only the one you need.
>
> Though I have a M1 mac mini now as well and its very fast - and it can
> load all into IDEA.
>
>
> Also for IDEA you may just go with the community version as it does
> not come with a gazillion plugins installed, that you never really use
> anyway.
>
>
>
> On Wed, Oct 13, 2021 at 7:53 PM Steve973 <steve...@gmail.com> wrote:
> >
> > Do many of you use Intellij IDEA for working on camel-spring-boot?  It
> > takes about 5 minutes for my IDE to load with this project active, and my
> > machine is far from slow.  What do you all recommend?  I have the memory
> > set to a maximum of 6G, so I don't think it's a matter of the memory.
> >
> > Thanks,
> > Steve
>
>
>
> --
> Claus Ibsen
> -----------------
> http://davsclaus.com @davsclaus
> Camel in Action 2: https://www.manning.com/ibsen2
>


-- 
Otavio R. Piske
http://orpiske.net

Reply via email to