Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

notes: speeding up venv creation #24

Open
tusharsadhwani opened this issue Jun 27, 2024 · 1 comment
Open

notes: speeding up venv creation #24

tusharsadhwani opened this issue Jun 27, 2024 · 1 comment

Comments

@tusharsadhwani
Copy link
Owner

I don't like it when venv creation takes 2 seconds. Especially since I know it can be faster.

virtualenv would be the prime example, which is super fast by default.

I added microvenv which was super simple, but the problem with microvenv is that we have to run python -m ensurepip after which is really slow.

I looked at micropip from pyodide, and installer from pypa, and both don't fit our usecase.

So realistically, I'll have to figure out how virutalenv does it this fast. I have my ideas, such as it may just be copying or symlinking some stuff to get pip.

@tusharsadhwani
Copy link
Owner Author

virtualenv is infact just caching the pip wheel's contents in a directory.

$ cd /Users/tusharsadhwani/Library/Application\ Support/virtualenv

$ ls
py_info	wheel

$ ls wheel/3.12/image/1/CopyPipInstall/pip-24.0-py3-none-any/pip/
__init__.py		__pip-runner__.py	_vendor
__main__.py		_internal		py.typed

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant