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

Improve performance on dataframe to line conversion #486

Merged
merged 1 commit into from
Aug 11, 2017

Conversation

maxdolle
Copy link

@maxdolle maxdolle commented Aug 3, 2017

The function influxdb._dataframe_client.DataFrameClient._convert_dataframe_to_lines() is quite slow due when it comes to tags formatting (about 1 second for 10000 lines)

The slowest part was r.dropna() (line 312). I propose the attached solution that combines several steps into a single one to avoid the call to dropna().

@maxdolle
Copy link
Author

maxdolle commented Aug 3, 2017

Here is a small script to the test the performance of the proposed solution.
It has to be tested with influxdb installed (without this patch).

Results on machine:
1.47 seconds without fix
0.08 seconds with fix

performance_test.txt

@sebito91
Copy link
Contributor

@maxdolle could you please squash to one commit? This looks good, thanks for the fix.

@aviau this looks fine to me, should be ready to merge!

@maxdolle
Copy link
Author

@sebito91 It's squashed!

@xginn8 xginn8 merged commit 046b219 into influxdata:master Aug 11, 2017
@xginn8
Copy link
Collaborator

xginn8 commented Aug 11, 2017

thanks @maxdolle!

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

Successfully merging this pull request may close these issues.

3 participants
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