As @Ev replied, switching to Oracle JDK so far has worked.
From: https://tecadmin.net/install-oracle-java-11-ubuntu-18-04-bionic/
Step 1 - Prerequisites Before starting the installation, run the login shell as the sudo user and update the installed packages.
sudo apt update sudo apt upgrade
Step 2 - Install Java 11 on Ubuntu 18.04 You need to add the following PPA to your Ubuntu system. This PPA contains the oracle-java11-installer package containing the Java installation script.
sudo add-apt-repository ppa:linuxuprising/java
Then install Java 11 using the script from this package. This script downloads the Java archive from the official site and configures it on your system.
sudo apt update sudo apt install oracle-java11-installer
Also, install the following package to configure Java 11 as the default Java version on your Ubuntu 18 system.
sudo apt install oracle-java11-set-default
Here he can give an error and give instructions for downloading jdk_something_tar.gz and mkdir and copy them there. Each step is described in a terminal error trace.
You may also need to change the command to:
sudo apt install oracle-java11-set-default-local
Step 3. Verify the Java version Verify the installed version of Java on your system using the following command.
java -version java version "11.0.2" 2019-01-15 LTS Java(TM) SE Runtime Environment 18.9 (build 11.0.2+9-LTS) Java HotSpot(TM) 64-Bit Server VM 18.9 (build 11.0.2+9-LTS, mixed mode)
therefore, adding -local to some commands is requested by tracing errors in the terminal.
Then go here: https://www.jetbrains.com/help/pycharm/switching-boot-jdk.html
Basically from the GUI help menu you can:
Switch the Java runtime used to launch PyCharm # From the Help menu, select Find Action, or press Ctrl + Shift + A.
Locate and select the Switch Boot JDK action.
Select the desired JDK and click OK.
I was freezing every 10 minutes earlier, but now all day was in order.
The JDK was packaged with Pycharm by default, I suppose.