@@AZisk But I will still use Intel machine to deliver final build APK, as some libraries like Room required Alpha version, to be run in M1. But, it is almost ready as development machine ;-)
@@melonote-ai I'll check that out, at first it launches but android studio will just get stuck at "waiting for target devices To come online" so I download the android emulator for M1 preview version and got my way around that. " I just upgraded my Android studio now to the M1 version even the old emulator does not launch anymore"
To really test this you first need to fetch all grade dependencies once in the gradle cache. Clean project will not clear your global gradle and maven repository cache and therefore performance varies a lot at the first run of your intel run but the first silicon run is fast. Still the performance improvement is great
Gradle uses a build daemon which is not affected by the clean command. After the first build the caches are filled, thus subsequent builds are faster. In fact, it can take 20+ builds to reach "final" performance. Also, Gradle has in-built command caching which might be enabled here (you see it in the logs if a step says FROM-CACHE). This cache is also not affected by the clean command as it just looks at the inputs of a build step and if they are the same as for a previous step it will skip the build and use the previous output.
The 1st time you run a project it has to get all the dependencies from the web and then rebuild the project. But every consecutive build is always after as the dependencies are already resolved. this is why when you run after the 1st build it gives less time, due to already build dependencies and cache. For comparing the 1st build you just need to delete everything under the build and ~/.gradle folder
It would be interesting to know whether all the tools being called are ARM as well - gradle, javac, kotlinc, apt, etc. And Android build is calling sooo many other tools...
@@racistpixel1017 Yes, they do have arm versions. They are needed as they won’t run out of the box on M1 macs without their Intel counterpart getting emulated - meaning performance loss along with more power and resource and consumption.
Yes the global cache was empty at the first run. The first silicon run did have a filled gradle cache. Clear project does not clear the global gradle cache
My guess would be that the 1st build gradle is downloading the dependency jars into ~/.gradle (if you remove this after a build I'd guess a subsequent clean build will take more or less the same time as the 1st)
Hey I run a workload with cross compilation of C of C++ code, can you help me compare building a library like openssl or curl on M1 vs Intel Mac? Targets can be regular x86_64 and armv8 for Linux and Mac
Please consider finding a way to share for us who are still to walk that road, lm currently looking forward to having my MacBook Pro soon and start my journey as well.
Weird that you were seeing different build speeds, gradle run on java so as long as you're using the correct JVM it should be the same, unless it's using a newer version of gradle that is better optimized for m1
I have the 8gb M1 MBA, the opening time of android studio is almost 7 to 8sec, although gradle build and emulator speed is pretty good but can't find out why the opening speed is slower!!
I've used android studio on my M1 Mac mini for 3 months. It builds very fast. One problem is the IDE is not stable now. When typing code, the auto suggestion doesn't work well. Sometimes, it's laggy when typing
Was that a 8GB or 16GB M1 you tested? I currently have the 8GB M1 MacBook Pro and hoping I can use it to build iOS/iPadOS and android apps starting December.
he has the 16gig version, I think I remember him mentioning it in one of his vid's not sure which one though but you'll have no problem with the new M1 chip and the optimization features it has
I did a personal compare yesterday of V16.5.1 and V17 with Windows 11 AARCH64. Geekbench for 16.5.1 was mid 500’s, 17? Mid 1500’s. 16.5.1 Windows was reporting Apple Silicon 4 cores at 1ghz. V17 properly reports Apple Silicon 4 cores, 3.2ghz. The V17 upgrade is worthy.
@@vaguelysober Well I did not do geekbench, but according to the test I did it actually runs smoother (with more frames per second) and for me it is very important
@@tomershami1 parallels fixed their processor limiter, everything should be 3x Faster. Benchmarking proves it. Use proves it. Can’t wait to see what the man shows us.
Cool Comparison Alex. Just nitpicking: The bar chart should have the applications on the left and the architecture times as the bars. I think then it would be easier to compare imho.
The reason why it took longer on the first run is dependencies needed to be downloaded, on subsequent runs it's not downloading those again, it's using the local cache.
For us on Intel, please test whether simulator runs any faster on M1. Even when using x86 versions of it it runs slow on Intel. Maybe, just maybe, same architecture should make it run faster on Apple Sillicon :)
I just testet the performance of my 3900x with 32GB RAM using the Basic App. I did the exact same steps as you did, first build is 30 secs and all the other builds are 9 secs. But responsiveness after opening is nowhere near as good as with M1 optimised version. So my 105W TDP Processor 12 Core Beast is as fast as that Fanless mother****
Great Video! Today I got my Pro 16GB M1, just because of the Arctic Fox release. BTW, on my Linux machine, I also got the update, like one week ago, and the arctic fox on Linux is buggy )
Please try to do video on MacBook Air m1 base variant 8gb ram 8gb ram can run android studio parallelly emulators ,vs code and chrome,terminal I didn’t find any proper resources in TH-cam.? Thank you in advance ✌🏻
@@AZisk thanks so much, I watched the M1 videos and finally got one. I've Been a long time windows user , this was my first Mac . So far I don't regret the choice. Smooth for software development.
Honestly, the most impressive thing, I thought, is the Rosetta build times. That something as complex as building a software application for yet another architecture through translation of Intel code to ARM code and only getting about a 30% penalty (and no errors) is an amazing testament to Rosetta. Will be interested to compare M1 native to Intel native build times. I suppose I could do that myself with my Intel MacBook Pro and M1 Mac Mini, but then we wouldn’t need your channel (and we do, we do 😉).
The first initialization took longer because there are gradle initializations that occur prior to actually building the app on a first time setup I.e. dependency downloads, IDE setup, file indexing. Subsequently re-building the app will not repeat these steps therefore much lower build times.
Compiling empty project does not matter if it takes 20 seconds on M1 or 40 seconds on Intel. Try building with some real big prod open source project. First time build will obviously be greater than the subsequent build time because it would download al the dependencies. Also, give a try to build a KMM project those ones take the most time compiling.
honestly android studio is a dog and the simulator is SLOOOW. The last time I had to do android work, I ended up using microsoft's simulator. it works better than google's simulator in android studio. On my old Intel workstation builds were more than 2 minutes. Looks like on M1, it won't suck.
@@AZisk I'm really loving my M1. Yesterday I was testing a small reactjs website on my beefy workstation with AMD Ryzen 3700 / 64GB ram and M1 MB air. Running npm start on mbair it is instant, on the workstation is feels sloooow. By slow I mean 2-4 seconds and sometimes more than 6. Waking windows compared to mbair also feels slow.
I’m not an Android developer, but this gives me chills
i watch your videos for 2 main reason.
1. The quality info you provide
2.The humour
Thanks 🙏
The emulator is faster than my real phone!
It's looking pretty good.
@@AZisk But I will still use Intel machine to deliver final build APK, as some libraries like Room required Alpha version, to be run in M1. But, it is almost ready as development machine ;-)
My emulator doesn't work
@@schneidero Use Android 12 Preview arm64 image
@@melonote-ai I'll check that out, at first it launches but android studio will just get stuck at "waiting for target devices To come online" so I download the android emulator for M1 preview version and got my way around that. " I just upgraded my Android studio now to the M1 version even the old emulator does not launch anymore"
To really test this you first need to fetch all grade dependencies once in the gradle cache. Clean project will not clear your global gradle and maven repository cache and therefore performance varies a lot at the first run of your intel run but the first silicon run is fast.
Still the performance improvement is great
Figured it was something like that. Thanks! Good thing I throw out the first run number and report an average of subsequent runs. 😀
You can invalidate cache and then try building again. Invalidate cache option is usually in Files options.
also unix caches disk reads and cpu caches instructions
Or you could just ignore the cached dependencies and run a clean build everytime with this command.. "./gradlew assembleDebug --refresh-dependencies"
Gradle uses a build daemon which is not affected by the clean command. After the first build the caches are filled, thus subsequent builds are faster. In fact, it can take 20+ builds to reach "final" performance. Also, Gradle has in-built command caching which might be enabled here (you see it in the logs if a step says FROM-CACHE). This cache is also not affected by the clean command as it just looks at the inputs of a build step and if they are the same as for a previous step it will skip the build and use the previous output.
The 1st time you run a project it has to get all the dependencies from the web and then rebuild the project. But every consecutive build is always after as the dependencies are already resolved. this is why when you run after the 1st build it gives less time, due to already build dependencies and cache.
For comparing the 1st build you just need to delete everything under the build and ~/.gradle folder
It would be interesting to know whether all the tools being called are ARM as well - gradle, javac, kotlinc, apt, etc. And Android build is calling sooo many other tools...
is there such thing as arm version of java or grandle in first place? i dont think its how it works
@@racistpixel1017 Yes, they do have arm versions. They are needed as they won’t run out of the box on M1 macs without their Intel counterpart getting emulated - meaning performance loss along with more power and resource and consumption.
My work gave me a m1 macbook air. And the first time i clicked build, it took more than an hour to build.
I recommend your videos to all my friends because you provide awesome Content.
Keep it up man!
Thanks 🙏 glad you enjoy the vids
Is the first time because of cold cache? Even though you clean it it removes the build files but things that are loaded in RAM stays there yes?
Yep - the gradle dependencies need to be installed and cached the first time around. I discarded that run number anyway.
Yes the global cache was empty at the first run. The first silicon run did have a filled gradle cache. Clear project does not clear the global gradle cache
I've been waiting for this video
My guess would be that the 1st build gradle is downloading the dependency jars into ~/.gradle (if you remove this after a build I'd guess a subsequent clean build will take more or less the same time as the 1st)
Hey I run a workload with cross compilation of C of C++ code, can you help me compare building a library like openssl or curl on M1 vs Intel Mac? Targets can be regular x86_64 and armv8 for Linux and Mac
Which os is recommended for android apps without emulator for Windows
There are really few pain points I have been facing moving to M1 for development but still I love resolving them
Please consider finding a way to share for us who are still to walk that road, lm currently looking forward to having my MacBook Pro soon and start my journey as well.
I''m actually astounded by the speed developers have ported their environments over to the Apple's new architecture.
Prob cuz its apple
Weird that you were seeing different build speeds, gradle run on java so as long as you're using the correct JVM it should be the same, unless it's using a newer version of gradle that is better optimized for m1
Finally its working fine from last month
You should select "Invalidate caches and restart studio" before every test iteration for accurate results.
great vids love to more chanels like yours on youtub
this means that if samsung comes with 16gb tablets running android we can finally run android studio from tablets?
Hey Alex, Can you tinker with the power options profiles? it could increase performance without pluggin the laptop in. *in windows tests*
The mac is full throttle all the time
@@AZisk * sorry, I meant in Windows tests
So in Windows it's a bit weird, even after increasing the power to max, it still takes longer to build. Video coming
@@AZisk Aha, I have a custom profile that cranks the CPU up when I do heavy operations (building, games, ...), anyway, can't wait
He enjoys while building project on Apple version
impressive, now I can use my mba properly !
Is the M1 macbook air sufficient to run emulators in android studio? Or is that stretching it a lot?
I have the 8gb M1 MBA, the opening time of android studio is almost 7 to 8sec, although gradle build and emulator speed is pretty good but can't find out why the opening speed is slower!!
Can you test with ryzen 9 on linux instead of windows?
Eventually, yes, but the linux build is still not quite baked
Thank you so much. ☺️
"so that rosetta translation could be conributing to the slowdowns"
could? COULD?
I've used android studio on my M1 Mac mini for 3 months. It builds very fast. One problem is the IDE is not stable now. When typing code, the auto suggestion doesn't work well. Sometimes, it's laggy when typing
Your video helps a lot . Could you conduct test on compatibility deeper ? thanks
I'm currently working with Big Data (Hadoop Hive Pig, Spark, Scala) would be awesome if you can test it on the m1 and do a comparison.
I don't regret changing to M1 air from the 16 inch macbook pro at all... lol
8 or 16 Gig M1?
Thank you for sharing ♥️
Thanks for the videos! I love seeing the speed comparisons that prove me right to my co-workers 😂
Does emulator work now?
Oh man can’t wait for an apple silicon with 32GB ram.
The joy that was brought to you when the build completed in 8s was something else 😂😂 ! Great video Alex.
Was that a 8GB or 16GB M1 you tested? I currently have the 8GB M1 MacBook Pro and hoping I can use it to build iOS/iPadOS and android apps starting December.
he has the 16gig version, I think I remember him mentioning it in one of his vid's not sure which one though but you'll have no problem with the new M1 chip and the optimization features it has
@@nazihabdo1442 yea I thought about it and since I am starting, it should handle the first apps I attempt to build.
Do a test for parallels 17
I did a personal compare yesterday of V16.5.1 and V17 with Windows 11 AARCH64. Geekbench for 16.5.1 was mid 500’s, 17? Mid 1500’s. 16.5.1 Windows was reporting Apple Silicon 4 cores at 1ghz. V17 properly reports Apple Silicon 4 cores, 3.2ghz. The V17 upgrade is worthy.
@@vaguelysober Well I did not do geekbench, but according to the test I did it actually runs smoother (with more frames per second) and for me it is very important
@@tomershami1 parallels fixed their processor limiter, everything should be 3x Faster. Benchmarking proves it. Use proves it. Can’t wait to see what the man shows us.
Any specific tests you want to see?
@@AZisk I'm just interested though I've already run it on my M1 Mac, what tests do you think should be done?
Cool Comparison Alex. Just nitpicking: The bar chart should have the applications on the left and the architecture times as the bars. I think then it would be easier to compare imho.
yeah, you're probably right.
Never clicked so fast to a notification
Wow, that was FAST! Welcome back 😀
The reason why it took longer on the first run is dependencies needed to be downloaded, on subsequent runs it's not downloading those again, it's using the local cache.
I knew cache was involved. Sneaky bastard
Awesome video.. Pls also check the emulator's speed in later videos
Already done :)
Watching this video on an M1 MacBook Air that I bought after watching your videos.
Haha. Nice 👍
Now we have a stable release of android studio for apple silicon 😍
I have a problem on emulator M1
Speed of light.
For us on Intel, please test whether simulator runs any faster on M1. Even when using x86 versions of it it runs slow on Intel. Maybe, just maybe, same architecture should make it run faster on Apple Sillicon :)
Video coming soon :)
I just testet the performance of my 3900x with 32GB RAM using the Basic App. I did the exact same steps as you did, first build is 30 secs and all the other builds are 9 secs. But responsiveness after opening is nowhere near as good as with M1 optimised version. So my 105W TDP Processor 12 Core Beast is as fast as that Fanless mother****
Hey Alex! Great content btw were you able to try the emulator any updates on that ?
Yes update coming
Android Studio already available in M1
Nice video. Hope it will be on stable channel soon.
I hope so too
It is on stable channel but as a preview
Great Video! Today I got my Pro 16GB M1, just because of the Arctic Fox release. BTW, on my Linux machine, I also got the update, like one week ago, and the arctic fox on Linux is buggy )
Congrats on the new machine. Shame about Linux - they will probably have that sorted soon
Please try to do video on MacBook Air m1 base variant 8gb ram
8gb ram can run android studio parallelly emulators ,vs code and chrome,terminal
I didn’t find any proper resources in TH-cam.?
Thank you in advance ✌🏻
visual studio for mac 2022 is in preview now check it out as well.. Loved the content.. Thanks Alex
The best part , the emulator gives me warning that hardware acceleration is not enabled and yet it runs apps blazing fast.
Ti think 90% of subscribers of this channel are developers ✌️
You need to disable gradle's build caching in your gradle.properties. `org.gradle.caching=false`
What does that do?
What's difference tell me.
Will force download of dependency
Clear cache and invalidate it might take same time after that
In first build android studio get all package from internet and unzip and install
The emulator any updates , it was kinda not working of late
Yes, video coming soon
@@AZisk thanks so much, I watched the M1 videos and finally got one. I've Been a long time windows user , this was my first Mac . So far I don't regret the choice. Smooth for software development.
I will be waiting ☺️☺️☺️
Can you do a build with an emulator? I think it can be an interesting comparison.
Yep- video on the way
it have to download dependencies in first go, that'w why it took long
weird artifacts on the keyboard at 3:00. lol
Finally!!! ♥♥😘
joyful race 😃😃💯
From the gradle perspective, "clean" is not a SCRIPT, it's a TASK 😱😱😱
Honestly, the most impressive thing, I thought, is the Rosetta build times. That something as complex as building a software application for yet another architecture through translation of Intel code to ARM code and only getting about a 30% penalty (and no errors) is an amazing testament to Rosetta. Will be interested to compare M1 native to Intel native build times. I suppose I could do that myself with my Intel MacBook Pro and M1 Mac Mini, but then we wouldn’t need your channel (and we do, we do 😉).
Rosetta is impressive for sure. Intel MacBook Pro tests for Android Studio coming soon
The first initialization took longer because there are gradle initializations that occur prior to actually building the app on a first time setup I.e. dependency downloads, IDE setup, file indexing. Subsequently re-building the app will not repeat these steps therefore much lower build times.
Of course apple M1 High end good for android because is pure ARM.
Hello man how are u .
Compiling empty project does not matter if it takes 20 seconds on M1 or 40 seconds on Intel.
Try building with some real big prod open source project. First time build will obviously be greater than the subsequent build time because it would download al the dependencies.
Also, give a try to build a KMM project those ones take the most time compiling.
Done. Check out my other videos where i do that
Sorry Alex for late view of this video
You’re not late :)
Yeah, but this is for light mode. Everyone knows dark mode is faster.
😂
The editor is still slow af 😩
You need supercomputer to run android studio faster.
You don't know why it takes longer at first. Are you a android dev for real ??
@intel you made us fool all the time with generations gimmick.
New haircut !
Yeah, it's getting hard to control
Canary is buggy as fuck
honestly android studio is a dog and the simulator is SLOOOW. The last time I had to do android work, I ended up using microsoft's simulator. it works better than google's simulator in android studio. On my old Intel workstation builds were more than 2 minutes. Looks like on M1, it won't suck.
Yeah this was a huge pain in the past. Things are looking up
@@AZisk I'm really loving my M1. Yesterday I was testing a small reactjs website on my beefy workstation with AMD Ryzen 3700 / 64GB ram and M1 MB air. Running npm start on mbair it is instant, on the workstation is feels sloooow. By slow I mean 2-4 seconds and sometimes more than 6. Waking windows compared to mbair also feels slow.
🤯🤯🤯
Ehhh, shut up and take my money
Wow
wow
I hope someday i win ur giveaway.