i recently switched to Kotlin and to android studio Electric Eel (2022.1.1 Patch 1).
Now i do not know if it is Kotlin or the new version of studio but ever sinds that point in time my debugger is verry slow in evaluation values of variable.
And with slow i mean: after waiting for 10 minutes is was still collecting data.
In short this is unworkable.
I am hoping this is not a Kotlin feature because i am just getting used to it after a month of swearing to my PC :-)
anybody any idea?
You can try and invalidate your caches then restart your IDE. Alternatively check the location of your breakpoints, they might be the issue
Related
Whenever I type any single letter, Android Studio tries to seek suggestion of methods and classes, and this freezes program. Even though I wait, it doesn't show any suggestions at the end whether I try to type proper method/class name or not.
I tried to check CPU usage first because whenever I try to type letters, CPU usage suddenly jumps up to about 90% from 0~10%. I took screenshot of Activity Monitor, and total CPU usage keeps exceeding 100 whenever I try to type single letter
Plugin Kotlin takes ridiculously high CPU usage only for trying to seek suggestions. There are about 300 classes including both Java and Kotlin classes.
I set IDE max heap size as 8GB because I have 16GB RAM
I'm using Android Studio 4.2 Beta 2 version
Invalidating/Restarting caches didn't work. Removing .idea folder in Android project folder also didn't work.
Is there any reason for this problem? and can I solve this problem?
It turned out that some class was causing problem, this class is java with generics. T in generic requires to extend Enum and implement my other class, this seems to cause Android Studio freeze. I'm trying to find a way to reproduce, but solved it by creating static java method which handles my codes. Only Kotlin is causing freezings.
I am developing in Anypoint Studio 6.2 and am finding as I run my code the memory usage creeps up and up. Starting at approx. 800mb, after half an hour or so Anypoint is using around 9gb (I have 16gb of RAM).
The doesnt go down when I stop running and usually Anypoint hangs when I try and close it.
Has anyone else experienced this? Any ways to combat it?
Thanks.
You probably want to start Anypoint studio in clean mode. for this what you need to do is locate anypointstudio.ini in your install directory.
edit the file and place
-clean
as the first line in the file.
you might also consider checking and updating the
memory size params.
a complete example for your reference below:
-clean
-startup
plugins/org.eclipse.equinox.launcher_1.3.0.v20140415-2008.jar
--launcher.library
plugins/org.eclipse.equinox.launcher.win32.win32.x86_1.1.200.v20150204-1316
-vmargs
-Xms584m
-Xmx1024m
-XX:MaxPermSize=784m
-Dosgi.instance.area.default=#user.home/AnypointStudio/workspace
With one project open the IDE runs smoothly but once I open two the IDE runs painfully slow. I'm suspecting a memory issue.
I'm running an i7 2015 mbp with 16gb of memory. How can I up the amount of resources android studio is allowed to use to the point where two projects open won't lag?
I've already updated -xmx=2048 -XX:MaxPermSize=512m via Why Android Studio is slowing down when editing xml file or changing the design?
studio.vmoptions
-Xms256m
-Xmx2048m
-XX:MaxPermSize=512m
-XX:ReservedCodeCacheSize=225m
-XX:+UseCompressedOops
Modifying the properties the way I did is the first step.
The second step is not to touch Android Studio AT ALL until it is done processing. If you wait for all processes to complete (roughly 20 seconds) then it runs like it is supposed to.
It seems as though Android Studio's performance slows if you try using it when ANY processing is going on ie. if you wait for the first 20 seconds you're good to go but if it starts processing again for any other reason you have to wait until it's finished or you'll make the app lag quite badly for an indefinite period of time. This sounds like a bug that has nothing to do with memory available. In the meantime we'll just have to skirt around it...
** EDIT **
It seems as though the performance slowly crawls back if you lose it. Almost like a slow garbage collection. Restarting Android Studio when performance is poor is the only "fast track" I've found to getting around this bug.
I'm running AS 1.2.2. on OSX 10.10.3 The CPU usage swings wildly up and down. Trying to edit anything is a real pain - deleting characters, typing, type-checking - all are slow because Studio is consuming a huge amount of resources. I can press a key and must wait sometimes 5 seconds before it updates on the screen
Anyone else has this problem and figure out how to make Android Studio usable again.
I have written a C++ code for a vehicle routing project. On my dell laptop I have both Ubuntu and Windows 7 installed. When i run my code in a gcc compiler on UNIX platform it runs at least 10x faster than the exact same code on Visual C++ 2010 on the windows OS (both of them on the same machine). This is not just for one particular code, turns out this happens for almost every C++ code i have been using.
I am assuming there is an explanation to such a large differences in runtimes and why gcc out performs visual C++ run time wise. Could anyone enlighten me on this?
Thanks.
In my experience, both compilers are fairly equal, but you have to watch out for a few things:
1. Visual Studio defaults to stack-checking on, which means that every function starts with a small amount of "memset" and ends with a small amount of "memcmp". Turn that off if you want performance - it's great for catching when you write to the 11th element of a ten element array.
2. Visual studio does buffer overflow checking. Again, this can add a significant amount of time to the execution.
See: Visual Studio Runtime Checks
I believe these are normally enabled in debug mode, but not in release builds, so you should get similar results from release builds and -O2 or -O3 optimized builds on gcc.
If this doesn't help, then perhaps you can give us a small (compilable) example, and the respective timings.