I use VS code and building a sample app. I have a 6-core AMD processor (FX-6300) with 32 GB RAM, and an SSD. I've just been unable to get builds fast.
This is my current gradle.properties file
org.gradle.jvmargs=-Xmx3096m -XX:+UseParallelGC -XX:MaxPermSize=512m -XX:+HeapDumpOnOutOfMemoryError -Dfile.encoding=UTF-8
android.useAndroidX=true
android.enableJetifier=true
org.gradle.caching=true
org.gradle.daemon=true
org.gradle.vfs.watch=true
org.gradle.configureondemand=true
Even with no change building (F5: Start Debuging) the build takes 40 seconds.
gradlew --version shows
------------------------------------------------------------
Gradle 6.7
------------------------------------------------------------
Build time: 2020-10-14 16:13:12 UTC
Revision: 312ba9e0f4f8a02d01854d1ed743b79ed996dfd3
Kotlin: 1.3.72
Groovy: 2.5.12
Ant: Apache Ant(TM) version 1.10.8 compiled on May 10 2020
JVM: 15.0.2 (Oracle Corporation 15.0.2+7-27)
OS: Windows 10 10.0 amd64
Please help.
I have no idea what your code is or why its taking too much to build as you mention no info about .
But in case your building multiple projects adding org.gradle.parallel=true will help a lot .
And assuming your build will need org.gradle.jvmargs=-Xmx4096M then the next time all the details will be cached so it will spend less time to run , so giving more to org.gradle.jvmargs=-Xmx~ might help as well .
An increase in the memory size will help you to hold caches of your bigger build and thus improving the performance.
Related
I am trying to run a new flutter project but then i get this error.
* What went wrong:
Could not open settings generic class cache for settings file 'C:\Users\techj\OneDrive\Desktop\EshopperApplication\eshopper_application\android\settings.gradle' (C:\Users\techj\.gradle\caches\7.4\scripts\ea4ydi90mwjg9g63m7r6nimmx).
> BUG! exception in phase 'semantic analysis' in source unit '_BuildScript_' Unsupported class file major version 63```
I am new to flutter can you please help me out
My gradle version
```------------------------------------------------------------
Gradle 7.5.1
------------------------------------------------------------
Build time: 2022-08-05 21:17:56 UTC
Revision: d1daa0cbf1a0103000b71484e1dbfe096e095918
Kotlin: 1.6.21
Groovy: 3.0.10
Ant: Apache Ant(TM) version 1.10.11 compiled on July 10 2021
JVM: 19.0.1 (Oracle Corporation 19.0.1+10-21)
OS: Windows 11 10.0 amd64
i was hopping the application would run as intended only to be flagged with this error..Spent a few hours doing some research but then i was hopping the problem would be with my gradle file or version but nothing seems to working for me.
I am using IntelliJ 2019.1.3 Community Edition.
In Scala compile server, JVM maximum heap size: 4096
my idea.vmoptions:
-Xms4096m
-Xmx6144m
-XX:ReservedCodeCacheSize=2048m
-XX:+UseCompressedOops
-Dfile.encoding=UTF-8
-XX:+UseConcMarkSweepGC
-XX:SoftRefLRUPolicyMSPerMB=50
-ea
-Dsun.io.useCanonCaches=false
-Djava.net.preferIPv4Stack=true
-Djdk.http.auth.tunneling.disabledSchemes=""
-XX:+HeapDumpOnOutOfMemoryError
-XX:-OmitStackTraceInFastThrow
-Xverify:none
-XX:ErrorFile=$USER_HOME/java_error_in_idea_%p.log
-XX:HeapDumpPath=$USER_HOME/java_error_in_idea.hprof
Environment
IntelliJ IDEA 2019.1.3 (Community Edition) Build #IC-191.7479.19, built on May 28, 2019 JRE: 1.8.0_202-release-1483-b58 x86_64 JVM: OpenJDK 64-Bit Server VM by JetBrains s.r.o macOS 10.14.5
IntelliJ Scala plugin v2019.1.8
CPU: 2,6 GHz Intel Core i7
32 GB 2400 MHz DDR4
memory indicator shows 2582 used of 6060M
my current project is quite big, ( over 800 files )
and very often even in small files intellij can hang for a few secs, inpections took ages..
Can I speed it up ?
If this still occurs, you should file a bug; as a user of IntelliJ you should not need to worry about a slow editor.
To investigate the problem further, you can first look in the directory from "Help | Show Log in $FileManager". If there are any subdirectories named threadDumps-*, you can find out what stops the editor from being responsive.
You can find more details in the instructions for reporting performance problems in IDEA.
It happened today when I suddenly noticed processes started getting slow on the computer. So I checked Task Manager to see what causes it.
I have waited a couple of minutes to see if it changes by keeping Visual Studio Code in idle state and then my computer dumps the memory in BSoD (blue screen of death).
After rebooting, I tried the same way to reproduce the state and within 20~30 minutes, it is up to 5 GB.
0 909 4452 c:\Users\arbaz\.vscode\extensions\ms-python.python-2018.12.1\languageServer.0.1.72\Microsoft.Python.LanguageServer.exe
What are the possible reasons causing this and how do I fix it?
Latest version:
Version: 1.30.0 (system setup)
Commit: c6e592b2b5770e40a98cb9c2715a8ef89aec3d74
Date: 2018-12-11T22:29:11.253Z
Electron: 2.0.12
Chrome: 61.0.3163.100
Node.js: 8.9.3
V8: 6.1.534.41
OS: Windows_NT x64 10.0.17134
Version: Code 1.30.0 (c6e592b2b5770e40a98cb9c2715a8ef89aec3d74, 2018-12-11T22:29:11.253Z)
OS Version: Windows_NT x64 10.0.17134
CPUs: AMD Ryzen 7 1700 Eight-Core Processor (16 x 3000)
Memory (System): 15.95 GB (3.87 GB free)
VM: 40%
Screen Reader: no
Process Argv: C:\Users\arbaz\AppData\Local\Temp\tasks.py
GPU Status: 2d_canvas: enabled
checker_imaging: disabled_off
flash_3d: enabled
flash_stage3d: enabled
flash_stage3d_baseline: enabled
gpu_compositing: enabled
multiple_raster_threads: enabled_on
native_gpu_memory_buffers: disabled_software
rasterization: enabled
video_decode: enabled
video_encode: enabled
webgl: enabled
webgl2: enabled
CPU % Mem MB PID Process
0 66 14620 code main
0 84 1092 gpu-process
0 51 6332 shared-process
0 199 8312 window (tasks.py - Visual Studio Code)
0 85 11724 extensionHost
0 2278 4452 c:\Users\arbaz\.vscode\extensions\ms-python.python-2018.12.1\languageServer.0.1.72\Microsoft.Python.LanguageServer.exe
0 5 11296 console-window-host (Windows internal process)
0 187 14320 window (Process Explorer)
Extensions:
Extension Author Version
(truncated)
-------------------------------------------------------
better-comments aar 2.0.3
vscode-django bat 0.17.0
unique-lines bib 1.0.0
python-extension-pack don 1.4.0
permute-lines ear 0.0.10
MagicPython mag 1.1.0
python ms- 2018.12.1
vscodeintellicode Vis 1.1.2
This issue is mostly caused by the extensions.
Try to monitor menu Help → Open Process Explorer for a certain period to see which process name is taking large memory.
Try uninstalling all extensions and removing all their junk from %USERPROFILE%\.vscode\extensions for windows.
This problem happened to me yesterday. I managed to fix the problem, but I am not sure if my solution applies to yours. I'm using Windows 10 and Visual Studio Code version 1.33.1.
The solution is to go to settings and enable jedi. The culprit that was consuming excessive RAM was Python language server. So, by enabling jedi, instead of using the Python language server for the intellisense function, jedi was used instead.
I'm running into an issue using IntelliJ on Windows 10 where running an SBT task appears to consume 100% of a core in a busy loop waiting for input. Has anyone else run into this issue?
JDK (Oracle 1.8.0_72, OpenJDK 1.8.x, Azul Zing)
java version "1.8.0_152"
Java(TM) SE Runtime Environment (build 1.8.0_152-b16)
Java HotSpot(TM) 64-Bit Server VM (build 25.152-b16, mixed mode)
JRE: 1.8.0_152-release-1024-b8 amd64
JVM: OpenJDK 64-Bit Server VM by JetBrains s.r.o
Library Dependencies
Scala 2.12
sbt 1.0.4 (also occurs with 1.1.0)
IntelliJ IDEA 2017.3.2 (Community Edition)
Build #IC-173.4127.27, built on December 25, 2017
Expected Behavior
Run project using IntelliJ IDEA
Wait for compilation to complete
Project idles with little to no CPU usage
Actual Behavior
Run project using IntelliJ IDEA
Wait for compilation to complete
Project uses ~15 - 20% CPU (1 core on a Core i7 7700HQ) - 1 thread is in a tight loop that results in 100% usage of 1 core.
If I run the project via the SBT shell outside of IntelliJ (e.g. via the terminal), there is much lower CPU usage (~1-5% total, as opposed to ~20% in IntelliJ). If I run the project in the IntelliJ SBT shell prompt, I experience similar high CPU usage.
Thread profile
sbt -> PlayConsoleInteractionMode
CPU usage
I am new to Eclipse Juno using the Gradle Integration for Eclipse plugin. I am at a loss why gradle works perfectly from the command line and as an external tool; but in Eclipse Juno Package Explorer menu: gradle task it fails constantly with the following stack trace:
Error while initializing classpath container
Unable to start the daemon process.
This problem might be caused by incorrect configuration of the daemon.
For example, an unrecognized jvm option is used.
Please refer to the user guide chapter on the daemon at http://gradle.org/docs/1.5/userguide/gradle_daemon.html
Please read below process output to find out more:
java.lang.IllegalArgumentException: URI has an authority component
at java.io.File.(File.java:423)
at org.gradle.api.internal.classpath.EffectiveClassPath.findAvailableClasspathFiles(EffectiveClassPath.java:41)
at org.gradle.api.internal.classpath.EffectiveClassPath.(EffectiveClassPath.java:32)
at org.gradle.api.internal.classpath.DefaultModuleRegistry.(DefaultModuleRegistry.java:61)
at org.gradle.api.internal.classpath.DefaultModuleRegistry.(DefaultModuleRegistry.java:55)
at org.gradle.launcher.bootstrap.ProcessBootstrap.runNoExit(ProcessBootstrap.java:41)
at org.gradle.launcher.bootstrap.ProcessBootstrap.run(ProcessBootstrap.java:32)
at org.gradle.launcher.daemon.bootstrap.GradleDaemon.main(GradleDaemon.java:22)
Could not fetch model of type 'EclipseProject' using Gradle distribution 'http://services.gradle.org/distributions/gradle-1.5-bin.zip'.
The env variables for GRADLE_HOME, GRADLE_USER_HOME, PATH are all setup correctly. From the command line gradle -v returns:
Gradle 1.6
Gradle build time: Tuesday, May 7, 2013 9:12:14 AM UTC
Groovy: 1.8.6
Ant: Apache Ant(TM) version 1.8.4 compiled on May 22 2012
Ivy: 2.2.0
JVM: 1.7.0_45 (Oracle Corporation 24.45-b08)
OS: Windows 7 6.1 amd64
Eclipse version:
Eclipse Java EE IDE for Web Developers.
Version: Juno Service Release 2
Build id: 20130225-0426
OS is Win7 64 on amd64 platform with 4GB of system memory so it show not be a memory issue and there are no gradle daemons running when I get the above stack trace in Eclipse Juno.
I have exhausted all means on the web, this site, and my team to resolve the issue. I need some help please.
Windows 7 sets the user.home as a UNC path.
Add -Duser.home=x:\ to your Eclipse INI file where "x" is a local drive name.
That should solve your problem
If you are using the Gradle plugin, ensure it is pointing to the correct Gradle installation. I get the error you show when I use the embedded Gradle that comes with Spring Tools Suite.