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

Improve performance of "concat_columns" #938

Merged
merged 2 commits into from
Jul 3, 2024
Merged

Conversation

philss
Copy link
Member

@philss philss commented Jul 2, 2024

This PR changes the implementation of "concat_columns" for lazy and eager dataframes.

Before this we were doing a join of a temporary column which consumes a lot of memory and is slower than concatenating each column of the DFs.

There is a small change in behaviour for lazy frames, causing frames of different sizes to be merged with nil values for the smaller columns.

Closes #937

philss added 2 commits July 2, 2024 17:57
This is a different approach that consumes less memory and is faster.
There is a small change in behaviour, which is the following: now we can
concat DFs of different heights. The smaller columns will be filled with
`nil` values.
@philss philss changed the title Improve performance for "concat_columns" Improve performance of "concat_columns" Jul 2, 2024
@philss philss requested a review from josevalim July 3, 2024 00:00
@philss philss merged commit ac38e28 into main Jul 3, 2024
4 checks passed
@philss philss deleted the ps-improve-concat-horizontally branch July 3, 2024 13:56
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

Successfully merging this pull request may close these issues.

Large memory usage when using Explorer.Dataframe.concat_columns on 30k (small) data frames. Memory leak?
2 participants