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

Performance: Loading from robot modules taking ~24 seconds #7

Open
joeflack4 opened this issue Oct 19, 2022 · 2 comments
Open

Performance: Loading from robot modules taking ~24 seconds #7

joeflack4 opened this issue Oct 19, 2022 · 2 comments

Comments

@joeflack4
Copy link

joeflack4 commented Oct 19, 2022

Overview

I just started using this package to convert OWL to Obographs. So far it is working great! The only issue I experience so far is very slow load time when importing the robot module. It's not even that I'm using the module in any way; just importing it:

t0 = datetime.now()
from bioontologies.robot import ParseResults, convert_to_obograph_local
t1 = datetime.now()
print(f'Loaded bioontologies in {(t1 - t0).seconds} seconds')

Loaded bioontologies in 24 seconds

Additional info

This happened whether or not I did from bioontologies.robot import ParseResults, convert_to_obograph_local or from bioontologies import robot.

@cthoyt
Copy link
Member

cthoyt commented Oct 19, 2022

There are a few things that get loaded to support Bioregistry standardization that can be made more lazy in case they're not used, I'm actually working on improving some of the underlying code in the Bioregistry in biopragmatics/bioregistry#631 right now

@joeflack4
Copy link
Author

Sounds like a good plan to me!

cthoyt added a commit that referenced this issue Nov 14, 2022
cthoyt added a commit that referenced this issue Nov 14, 2022
Related to #7
@cthoyt cthoyt mentioned this issue Nov 14, 2022
1 task
cthoyt added a commit that referenced this issue Nov 14, 2022
* Lazy load converter from Bioregistry

Depends on biopragmatics/bioregistry#652, helps with #7

* Add function for guessing the version of a parse results

* Use robot merge

* Add function for loading local obo graph json

* Better access to properties

* Inline upgrading

Related to #7

* Update data.tsv

* Update setup.cfg

* Flake
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

2 participants