2

With Android Studio v3.5.2 on Ubuntu 18.04, the time elapsed between start and 'Welcome' window on my laptop was about 7...10 seconds. After upgrading to Ubuntu 19.10, same Android Studio has startup time about 25...30 seconds. No CPU or RAM usage spikes detected by System Monitor (2% and 10% accordingly). After 'Welcome' window everything works just fine. Here are log records:

2020-01-21 00:05:31,671 [49-5587405]   INFO -        #com.intellij.idea.Main - JVM Args: -Xms256m -Xmx1280m -XX:ReservedCodeCacheSize=240m -XX:+UseConcMarkSweepGC -XX:SoftRefLRUPolicyMSPerMB=50 -XX:CICompilerCount=2 -Dsun.io.useCanonCaches=false -Djava.net.preferIPv4Stack=true -Djdk.http.auth.tunneling.disabledSchemes="" -Djna.nosys=true -Djna.boot.library.path= -da -Dawt.useSystemAAFontSettings=lcd -Dsun.java2d.renderer=sun.java2d.marlin.MarlinRenderingEngine -Dsun.tools.attach.tmp.only=true -Xmx2048m -XX:ErrorFile=/home/user/java_error_in_STUDIO_%p.log -XX:HeapDumpPath=/home/user/java_error_in_STUDIO.hprof -Didea.paths.selector=AndroidStudio3.5 -Djb.vmOptionsFile=/snap/android-studio/81/android-studio/bin/studio64.vmoptions,/home/user/.AndroidStudio3.5/config/studio64.vmoptions -Didea.platform.prefix=AndroidStudio -Didea.jre.check=true 
2020-01-21 00:05:31,671 [49-5587405]   INFO -        #com.intellij.idea.Main - ext: /snap/android-studio/81/android-studio/jre/jre/lib/ext: [cldrdata.jar, dnsns.jar, jaccess.jar, localedata.jar, meta-index, nashorn.jar, sunec.jar, sunjce_provider.jar, sunpkcs11.jar, zipfs.jar] 
2020-01-21 00:05:31,671 [49-5587405]   INFO -        #com.intellij.idea.Main - charsets: JNU=UTF-8 file=UTF-8 
2020-01-21 00:05:31,686 [49-5587405]   INFO -        #com.intellij.idea.Main - JNA library (64-bit) loaded in 14 ms 
2020-01-21 00:05:56,931 [49-5587405]   INFO -     #com.intellij.util.ui.JBUI - System scale factor: 1.0 (IDE-managed HiDPI)

What causes 25 sec. delay between 'JNA library loaded' and 'System scale factor: 1.0'?

UPDATE (06 MAY 2020)

As for Ubuntu 19.10, after one of the automatic system updates the bug suddenly disappeared. Its cause remains unknown.

Fedorov7890
  • 1,173
  • 13
  • 28
  • 1
    The same with a fresh install of Ubuntu 20.04. But if you use the flatpak version of Android-Studio it starts immediately. – user1185087 May 05 '20 at 06:36
  • Here cleaned launch in idea.log https://pastebin.com/QJkXTFFm . From 08:40:22,110 to 08:40:47,095 nothing happens. – user1185087 May 05 '20 at 06:48

1 Answers1

1

Please try installing the following package:

sudo apt-get install appmenu-gtk2-module

This solved the delay in launching of Android Studio which was installed using snap in my case. Previously it would take about 30 seconds to begin doing any processing, now it takes about 4 or 5 seconds.

Muhammad bin Yusrat
  • 1,433
  • 1
  • 14
  • 19
  • 1
    Thanks for the answer, but I can't check it. My OS is Ubuntu 19.10 and after one of the automatic updates the bug suddenly disappeared. Now it starts in less than 5 seconds. – Fedorov7890 May 06 '20 at 15:14