Skip to content
This repository was archived by the owner on Oct 29, 2024. It is now read-only.

influxdb is slow to import when pandas is present #797

Open
wwade opened this issue Mar 26, 2020 · 1 comment
Open

influxdb is slow to import when pandas is present #797

wwade opened this issue Mar 26, 2020 · 1 comment

Comments

@wwade
Copy link

wwade commented Mar 26, 2020

I noticed that some commands where we're using influxdb.client were getting slow to run. I used import-profiler to dig into it and found that it was due to importing pandas within influxdb.dataframe_client. I hacked together an env var to avoid this and compared:

% time env INFLUXDB_NO_DATAFRAME_CLIENT=1 python -c 'import influxdb'    
                                                                         
real    0m0.157s                                                         
user    0m0.140s                                                         
sys     0m0.016s                                                         
% time env __INFLUXDB_NO_DATAFRAME_CLIENT=1 python -c 'import influxdb'  
                                                                         
real    0m0.480s                                                         
user    0m0.756s                                                         
sys     0m2.196s                                                         
%                                                                        

Is this something you might consider as a PR?

This is the gist of it: https://github.com/aristanetworks/influxdb-python/pull/2/files

It's just a WIP, but if you're OK with the approach, I can rebase + clean it up and submit a PR here.

Thoughts?

@russorat
Copy link
Contributor

@wwade thank you! yes we would happily review your PR. thank you!

sebito91 added a commit to auphofBSF/influxdb-python that referenced this issue Apr 8, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

2 participants