I'm using FB4 and my project will take atleast 30 minutes to compile entire project since it has 20 modules.
Everyday i have to logoff my machine since our company policy.
My problem is :
Everyday i have to spend 30 minutes to compile my entire project.
I have to spend another 30 minutes again to compile all modules in my project if i accidently closed my project or closed my Flex builder IDE.
Do you have any suggestion to avoid flexbuilder to compile my project again if i closed?
Thanks in advance.
Eclipse Java could probably use more memory to speed that up.
How can you speed up Eclipse?
Max value of Xmx and Xms in Eclipse?
Is 'Build Automatically' selected?
Maybe how you link your projects will also impact performance. Linking SWC instead of project references should improve time.
Related
I have a Java microservices project with 37 different modules (and growing). Whenever my versions change, Intellij reimports the Gradle build info and rebuilds all of them, including downloading the dependencies. This takes almost TWO hours! What can be done to speed this up?
I gave the compiler 3g of RAM hoping that would help, but the difference is minimal. Are there any other settings I can tweak?
Just wanted to add that I'm on a 64-bit, 6 core box, so I should certainly be able to build faster than this.
When choosing the Create New Project option after launching IntelliJ 2017.2, I get this endlessly spinning wheel on the Maven tag, saying “Loading archetype list…”.
Any way to get to a Maven archetype?
I just hit this on 2017.2.3 (just updated now) on Fedora 24 (oops time to upgrade)
The immediate solution was to change the Maven settings (File > Settings > Maven) to use my on-machine Oracle JDK 1.8.0_144 instead the default "internal JRE" 1.8.0_152. Btw, the importer uses JVM option -Xmx768m by default.
And we go on...
Wait
Loading the full list of Maven archetypes seems to be quite an exertion for IntelliJ. Surprising, as I don't recall any such long delays in NetBeans.
So wait, be patient. May take a couple minutes. Make tea, pat the dog. Wait for the fan on your computer to spin up and then quiet again.
Use more memory
I currently have VM options for importer set to -Xmx2048m as shown in the Answer by Tonhofer.
I do not know if this point was key, but my problem has gone away «knock-on-wood». So this might be helping.
FYI… I have a 16-gig MacBook Pro (Retina, 15-inch, Late 2013) running Sierra 10.12.6 with two Java implementations, Java 8 Update 144 from Oracle and Java 9 beta jdk-9+181 from OpenJDK.
Quit, update repositories
While I do not understand what all is going on, it seems like this has been a workaround for me.
Quit IntelliJ, then launch again.
In Preferences/Settings, go to Build, Execution, Deployment> Build Tools > Maven > Repositories. Click each of the listed repositories, and click the Update button. A spinning wheel appears for the duration of the update.
A copy of each repository’s data is being downloaded and parsed on your local machine, descriptions of all the libraries known by that repository. Some of the repositories may be quite large with many listed projects. So this process may take a while, possibly more than several minutes.
When the updates are complete, try the New Project feature again.
Add more memory
Settings > Maven > Importing
VM options for importer -Xm1024m (or more)
Closing out of IntelliJ and creating the project from this window helped:
IntelliJ Welcome Screen
I managed to solve the issue by updating the NVIDIA driver, based on IntelliJ logs. Anything else did not work for me. The list loads now in a few seconds..finally.
Edit:
as Basil suggested, here are some clarifications. I am on Windows 10 Home Edition 64b, and I have IntelliJ 2017.2 with Java 1.8.0_152. I checked IntelliJ logs and followed a standard procedure: I went on Google and I searched by that exception (I can't remember what and where) and found a site where someone suggested to update my nVidia drivers. For the update, you only need to go to nVidia site and from that on it should be easy. I was on a 2016 driver and got to 2018 version after the update. I also have the previously added configurations from other comments.
I've tried building it:
parallel (helps a bit)
daemon=true
preDexLibraries true/false ( no big difference )
incremental true
offline
It takes >40s EVERY time. It doesn't matter if I change anything or not. Building it after "gradle clean" takes >50s.
I hope that I'm doing something wrong. Eclipse/ant could build consecutive builds WITH CHANGES in <10s.
Any help how to bring this <10s appreciated.
Yes, we have a lot of modules, some jar libraries, some maven dependancies. Still don't get why would it take >40s for two consecutive builds with no changes.
Gradle used: 2.2.1
Android studio: not really relevant, usually building it only with Gradle.
EDIT: adding some profiling logs.
:app:dexProjDebug 22.541s
:app:shrinkProjDebugMultiDexComponents 4.279s
:app:compileProjDebugJava 3.478s
:app:packageProjDebug 2.591s
:app:processProjDebugResources 2.590s
:app:packageAllProjDebugClassesForMultiDex 2.536s
:app:createProjDebugMainDexClassList 2.126s
You need to properly define inputs and outputs even for library projects with source code. (Gradle Documentation). Do you get UP-TO-DATE message when you rebuild second time onwards?
If you have no changes to the other modules, you can build the app itself using gradlew :app:build. This will eliminate the time Gradle spends on building the other modules. You can build any module separately like this as well, using gradlew :moduledirectoryname:build. If you need to build one module and the app, you can execute both tasks at once to avoid going through Gradle's configuration stage twice: gradlew :app:build :moduledirectoryname:build
If possible, update to Gradle 2.4. It's significantly faster (claiming 20-40%).
One of the most significant build time reducers is the preDex task. Check whether preDex is running in your build. It increases build time the first time you run it, but dramatically reduces build times in subsequent builds, as most of your SDKs and libraries will already be dexed. Note however that it won't run under some conditions, e.g. if you use multidex.
Btw Google are well aware of build times with Gradle and Android Studio and are going to introduce significant improvements in upcoming releases, including Jack and Jill which will allow compiling from source code directly to dex. You can already try to experiment with them - see here: http://tools.android.com/tech-docs/jackandjill.
Also worth watching this video from recent Google I/O: https://youtu.be/f7ihSQ44WO0?t=327
Download Genymotion emulator. It is very fast and good to run android apps. It will save you a lot of time.
Here is the link - GenyMotionDownload
I need solution to speed up maven build process.
The project is based on Adobe cq5 otherwise AEM and i have more than 10 modules in my project where the build happens in linear way.
Currently Build process takes more than 10 min to compile.
is any other specific tool available or other way to speed up the process?
Thanks
I have one suggestion,If you have 10 modules than make separate profile for each module,and build only that part in which you are changing and modifying,no need to deploy 10 modules each time unnecessarily.It will not speed up maven project build but can help you to save your time.It is a workaround but will be helpful .
Try mvn -T 4 clean install #Builds with 4 threads
Its a multi-threaded mode to run Maven and is faster. Apache documentation here.
To add to the other answers:
1) Give more memory resources to the server where the AEM instance is installed, content creation involves a lot of disk access so using SSD is a must.
2) Having a clean AEM instance helps to speed up the process. As you may know the AEM repository grows because of revisions so each time you deploy the repository size grows and it becomes slower. if it's a production environment use maintenance tools like revision clean up and compaction.
revision clean up
how to maintain repository
As per my knowledge there are no such mechanism to speed up.
better to make a build of particular module, it will deploy faster rather waiting for all 10 module to be happened.
Thanks
You can try using the suggested answers to build modules in parallel. It should speed up the build in theory.
But really there is no magic answer. You have to find the bottleneck in your build, it could be the number of dependencies, it could be a specific slow plugin, it could be hardware related, and it could be something else.
Try this: https://github.com/lptr/maven-time-tracker
It may help you find the bottleneck.
I would like to answer this question, knowing it was posted a really long time back.
Currently I am using AEM 6.3 and to recompile and deploy CORE module changes there is a simple maven trick -
This command tells us to -
run 1 thread/core
compile just the core module of the list of projects
and of course, zip package and send it to running AEM instance.
In my observation, this reduced the turnaround time by a huge margin.
I am wondering what is the recommended system requirement for using eclipse and m2eclipse plugin. I am using E8400 and 4Gb ram currently. Nearly every time I changed something in the pom.xml the eclipse IDE would hang for a while (about 1-3 minutes) before it finished. Is it normal?
Generally speaking, it is not normal.
I do all my development on a laptop with 4GB of RAM and I am able to run Eclipse + M2Eclipse + Tomcat + Flex/Flash + MySQL, etc. I change my POMs (8 of them in one project) constantly and it usually never takes more than a few seconds.
That said, depending on the size of your dependency tree it can take a while to download all the dependencies to your local machine. You can find out what is happening by opening the console view in Eclipse and selecting the Maven console within it. Check it out and report back, perhaps there will be a clue as to some other problem.