Avoid PyCharm Overloading
=========================
This speeds up PyCharm's package index processes and avoids CPU & memory
overloading.
On my machine (4c/32GB) with 5 conda environments and 10 projects, this reduces
PyCharm's package scanning from 15 minutes to 45 seconds.
Why?
----
When PyCharm has multiple conda environments, it will sometimes launch concurrent
package scanning across those environments. To do so, it uses the `conda` cli,
and a tool called conda_packaging_tool.py, available from the JetBrains
intellij-community github repository (see below).
Unfortunately, these tools do not behave well when launched in parallel, as
they tend to overload CPU & memory in this case.
How?
----
To avoid stalling these processes, we modify their sources as follows:
1. modify the conda cli
$ conda activate base
$ pip install runfast
$ nano `which conda`
Modify the main section:
if __name__ == '__main__':
from conda.cli import main
from runfast import cached
cached(main)
2. modify the conda_packaging_tool.py
if __name__ == '__main__':
from runfast import cached
cached(main)
How does this work?
-------------------
Two simple steps:
1. When called in parallel, only one process is allowed to proceed.
2. `runfast.cached` caches the output of these tools (stdout, stderr) for 1 minute,
given the same command line parameters
That is, when PyCharm launches 5 package scanning (`conda list`) commands, only
one of them will run immediately. If some of the scans are for the same environment,
only one of them will actually run, while the others simply return the same output.
How to clear the cache or avoid caching at all?
$ export RUNFAST_NOCACHE=1
Testing
-------
a) conda packaging tool
# first time
$ time python /opt/pycharm-community-2021.2.1/plugins/python-ce/helpers/conda_packaging_tool.py
real 0m13.271s
user 0m9.631s
sys 0m1.936s
# second time
$ time python /opt/pycharm-community-2021.2.1/plugins/python-ce/helpers/conda_packaging_tool.py
real 0m3.159s
user 0m0.139s
sys 0m1.298s
b) conda cli
# first time
$ time conda list -p /path/to/env
real 0m7.985s
user 0m7.883s
sys 0m0.087s
# second time
real 0m0.152s
user 0m0.116s
sys 0m0.032s
References
----------
* https://github.com/JetBrains/intellij-community/blob/master/python/helpers/conda_packaging_tool.py
* https://github.com/conda/conda/blob/33a142c16530fcdada6c377486f1c1a385738a96/conda/core/index.py#L53
This speeds up PyCharm's package index processes and avoids CPU & memory overloading
Overview
This is the Quiz that I made using Python Programming Language. This can only run in the Terminal
This is the Quiz that I made using Python Programming Language. This can only run in the Terminal
1st Online Python Editor With Live Syntax Checking and Execution
PythonBuddy ποΈ π Online Python 3 Programming with Live Pylint Syntax Checking! Usage Fetch from repo: git clone https://github.com/ethanchewy/Python
This repository contains the code for the python introduction lab
This repository contains the code for the python introduction lab. The purpose is to have a fairly simple python assignment that introduces the basic features and tools of python
Convert text with ANSI color codes to HTML or to LaTeX.
Convert text with ANSI color codes to HTML or to LaTeX.
Addons like multipages for streamlit webapp
streamlit_pages Installation $ pip install streamlit-pages Features Adding multiple pages to streamlit Sharing specific pages Usage import streamlit
Your copilot to studies and work (Pomodoro-timer, Translate and Notes app)
Copylot Your copilot to studies and work (Pomodoro-timer, Translate and Notes app) Copylot are three applications in one: Pomodoro Translate Notes Cop
OpenTracing API for Python
OpenTracing API for Python This library is a Python platform API for OpenTracing. Required Reading In order to understand the Python platform API, one
An Agora Python Flask token generation server
A Flask Starter Application with Login and Registration About A token generation Server using the factory pattern and Blueprints. A forked stripped do
It is convenient to quickly import Python packages from the network.
It is convenient to quickly import Python packages from the network.
GDSC UIET KUK π , welcomes you all to this amazing event where you will be introduced to the world of coding π» .
GDSC UIET KUK π , welcomes you all to this amazing event where you will be introduced to the world of coding π» .
Reference management solution using Python and Notion.
notion-scholar Reference management solution using Python and Notion. The main idea of this app is to allow to furnish a Notion database using a BibTe
A beautiful and useful prompt for your shell
A Powerline style prompt for your shell A beautiful and useful prompt generator for Bash, ZSH, Fish, and tcsh: Shows some important details about the
π π PyComp - Java Code compiler written in python.
π π PyComp Java Code compiler written in python. This is yet another compiler meant for babcock students project which was created using pure python
CupScript is a simple programing language made with python
CupScript CupScript is a simple programming language made with python It includes some basic functions, variables, loops, and some other built in func
An app about keyboards, originating from the design of u/Sonnenschirm
keebapp-backend An app about keyboards, originating from the design of u/Sonnenschirm Setup Firstly, ensure that the environment for python is install
Python programs, usually short, of considerable difficulty, to perfect particular skills.
Peter Norvig MIT License 2015-2020 pytudes "An Γ©tude (a French word meaning study) is an instrumental musical composition, usually short, of considera
Shows VRML team stats of all players in your pubs
VRML Team Stat Searcher Displays Team Name, Team Rank (Worldwide), and tier of all the players in your pubs. GUI WIP: Only username search works (for
Unofficial package for fetching users information based on National ID Number (Tanzania)
Nida Unofficial package for fetching users information based on National ID Number made by kalebu Installation You can install it directly or using pi
PyCASCLib: CASC interface for Warcraft III
PyCASCLib CASC interface for Warcraft III. This repo provides bindings for JCASC: https://github.com/DrSuperGood/JCASC Installation Jdk is required fo
Python script to autodetect a base set of swiftlint rules.
swiftlint-autodetect Python script to autodetect a base set of swiftlint rules. Installation brew install pipx