Skip to content
This repository was archived by the owner on Oct 29, 2024. It is now read-only.
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

@wwade

Description

@wwade

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?

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

      pFad - Phonifier reborn

      Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

      Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


      Alternative Proxies:

      Alternative Proxy

      pFad Proxy

      pFad v3 Proxy

      pFad v4 Proxy