Skip to content

Time taken to get an object. #1328

Answered by sighingnow
PaulRudin asked this question in Q&A
Discussion options

You must be logged in to vote

As a workaround, you could convert polars dataframe to pandas dataframe before put and convert it back after getting from vineyard.

From the following example you can see a great performance gain when vineyard helps avoid the serialization and deserialization, even some to/from pd.DataFrame conversion is needed.

With native polars integration. The performance should be improved further (will be published soon).

In [23]: df
Out[23]:
shape: (800_000, 80)  # 512M
....

In [24]: %timeit -n 1 -r 1 client.put(ddf)
1.69 s ± 0 ns per loop (mean ± std. dev. of 1 run, 1 loop each)

In [25]: %timeit -n 1 -r 1 client.put(ddf.to_pandas())
369 ms ± 0 ns per loop (mean ± std. dev. of 1 run, 1 loop each)

Replies: 2 comments 2 replies

Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
2 replies
@PaulRudin
Comment options

@sighingnow
Comment options

Answer selected by sighingnow
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants