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

import xbitinfo too slow #189

Open
ayoubft opened this issue Apr 6, 2023 · 3 comments
Open

import xbitinfo too slow #189

ayoubft opened this issue Apr 6, 2023 · 3 comments
Labels
documentation Improvements or additions to documentation good first issue Good for newcomers

Comments

@ayoubft
Copy link
Contributor

ayoubft commented Apr 6, 2023

Is taking 1min to import bitinfo normal?

image

How can I investigate what's causing this?

@rsignell-usgs
Copy link
Contributor

I installed xbitinfo-python from conda-forge and it loads in about 12s. Definitely nice if you don't need the Julia stuff.

@observingClouds
Copy link
Owner

Importing xbitinfo when installed with e.g. conda install xbitinfo does indeed take a long time as it does a lot of Julia initialisations (https://github.com/observingClouds/xbitinfo/blob/c917b4304e26a8cc69a9eabd2cc128287f8e7cd4/xbitinfo/xbitinfo.py#L22-33). We should document these options. The pure python option is still fairly new and does not offer all options of the Julia version.

@observingClouds observingClouds added documentation Improvements or additions to documentation good first issue Good for newcomers labels Apr 12, 2023
@Arya-Nigam
Copy link

you can use PyOxidizer to speed up the import of Python modules like xbitinfo. PyOxidizer is a tool that packages Python applications into a single executable, which can significantly reduce import times by bundling everything together.

`# pyoxidizer.bzl

Import the Python interpreter

from pyoxidizer import PythonInterpreter

Create a Python interpreter

python = PythonInterpreter()

`

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
documentation Improvements or additions to documentation good first issue Good for newcomers
Projects
None yet
Development

No branches or pull requests

4 participants