Why Android Studio, Intellij use JVM Server instead Client as default - android-studio

It is just a curious question. Why Android Studio, Intellij use Server mode instead Client as default. Should I switch to client mode to improve AS's startup time?
Real differences between "java -server" and "java -client"?

The server JVM performs much deeper optimizations for the code. If you start and quit Android Studio hundreds of times each day, then switching to the client JVM may actually give you better performance. Most people don't do that, and are more concerned about better performance of the IDE in the long run than about startup time. Therefore, the server VM is used by default.

Related

"Skipped 75 frames! The application may be doing too much work on its main thread." running empty Compose app

i'm learning how to use jetpack compose in android project.
i just created new project and choose empty compose activity template,
after build finished i run application on Android Emulator.
it successfully run but in Run logs it keep showing info log as
I/Choreographer: Skipped 75 frames! The application may be doing too much work on its main thread.
i'm worried about this issue.
can anyone please help me for this issue i will be very thankful.
log error snapshot
That's nothing to worry about. Emulator performance isn't necessarily representative of real device performance and is often slower due to the overhead of running a second operating system (Android) within your operating system. This is especially true if you don't have the emulator's various hardware acceleration options enabled.
Also, apps run from Studio are debuggable, which disables a number of the optimizations that ART (the Android runtime) would be able to perform on a release app. Plus it needs a bit to load the code into memory and perform just-in-time compilation of the Compose framework.
Bottom line: Don't worry about performance unless you see issues in release mode on a real device.

What does the GradleDaemon daemon do?

In a machine I observe that org.gradle.launcher.daemon.bootstrap.GradleDaemon 4.1 is running running and having lots of threads.
It seems to be related to some build but I don't understand why it seems to stay alive with so many threads and if the settings of
-XX:MaxPermSize -XX:+HeapDumpOnOutOfMemoryError -Xms1024m -Xmx2048
are programmer configured or picked up based on some detection
The title question and some of the additional ones are answered by the Gradle documentation itself.
In short, the Gradle daemon enables using a hot JVM for running Gradle builds. And the parallel feature of Gradle means it uses a number of threads based on heuristics derived from the specification of the machine running it.

How to test libGDX games faster?

Android applications launches slow on AVD - it's unconvinient becasue of frequent changes in your application.
But in this video man launches his game very quickly ( at 7:03): https://www.youtube.com/watch?v=gR88EZEXEQg&list=PLZm85UZQLd2TPXpUJfDEdWTSgszionbJy&index=2
How to do it ?
Launching it for the very first time is often very slow. There isn't much you can do to make it faster. However, using 'snapshot' instead of 'Use Host GPU' in your emulator settings will make it boot faster. Other than that it is really dependent on your computers hardware. Adding more RAM may speed it up too.
Hope I helped :)

Is there a way (or plugin) to find out how much CPU each thread is taking while debugging with IntelliJ?

I'm debugging a program within IntelliJ and need to see how much CPU each thread is consuming.
I do using jvmtop but I need to manually run it with the process ID each time I stop and start the program.
Is there any way to do it automatically? (preferably through some mechanism in IntelliJ or a plugin, though a script would be fine too)
Any Java profiler, such as YourKit, can show this information to you. You'll need to run the profiler separately; there is no profiler that integrates directly into the UI of IntelliJ IDEA.

Visual studio 2012 slow unit testing

Running unit tests on VS2012 is lately very slow, when I run them it takes about 12 seconds before they start actually testing.
When I debug it is the same story before I hit the first breakpoint.
I hooked up process monitor and then I found this:
CreateFile \\WORKSTATION*\MAILSLOT\NET\NETLOGON SUCCESS
WriteFile \\WORKSTATION*\MAILSLOT\NET\NETLOGON BAD NETWORK PATH
After that it stays 9 seconds quiet.
CloseFile \\WORKSTATION*\MAILSLOT\NET\NETLOGON SUCCESS
What on earth is going on here? I cannot find any relation between MAILSLOT and Visual Studio at all, but it is going on for about 2 weeks now.
I had the same issue, using VS2012 Update 1. Based on the suggestion in http://social.technet.microsoft.com/Forums/en-US/winserverDS/thread/20eb50e9-3e68-4d29-bcdd-a4fc166b9c00 I disabled NetBios over TCP on my NIC. The tests now start up immediately, and procmon shows the time waiting on \MACHINE*\MAILSLOT\NET\NETLOGON dropped from 5 seconds to about 40 microseconds.
Visual Studio update 1 is now available and apparently addresses some speed issues with unit testing, whether it's related to Mailslot or not I don't know but presumably that's possible if it's in use as a communication mechanism by mstest somehow, from the MSDN forums:
In the upcoming Visual Studio quarterly release (ref http://blogs.msdn.com/b/visualstudioalm/archive/2012/10/08/visual-studio-2012-update-1-ctp.aspx), we have made some performance improvements. In short, we changed the underlying storage mechanism to improve the discovery/run time.
Download links and info here:
http://blogs.msdn.com/b/visualstudioalm/archive/2012/11/26/visual-studio-and-team-foundation-server-2012-update-1-now-available.aspx
This may not be related, but I noticed in some testing I was doing today that my Unit tests seemed to be running slower and slower. By chance I exited/restared Visual Studio and my tests are much faster now. There may be some sort of memory leak or other resource problem in the Unit Test mechanism. I am running update 1.

Resources