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

merge has exponential complexity crashing the runtime #631

Open
kozmaz87 opened this issue Mar 5, 2024 · 1 comment
Open

merge has exponential complexity crashing the runtime #631

kozmaz87 opened this issue Mar 5, 2024 · 1 comment
Labels
enhancement New feature or request help wanted Extra attention is needed

Comments

@kozmaz87
Copy link

kozmaz87 commented Mar 5, 2024

Describe the bug
Basically take 4 DataFrames each with 200 rows and 3 columns and start merging them in a loop and by the 3rd iteration the memory footprint balloons to over 4GB. At that point many runtimes kill the application including the Excel one where I was attempting to do this.

To Reproduce
Steps to reproduce the behavior:

  1. Create 4 DataFrames with 200 rows each, and 3 columns with a datetime index.
  2. Merge on the datetime column with how: 'outer'
  3. The memory footprint increases exponentially loop by loop.

Expected behavior
It should not crash from a 200 record merge and the footprint should be linear.

Screenshots
If applicable, add screenshots to help explain your problem.

Desktop (please complete the following information):

  • OS: [e.g. iOS] Windows
  • Browser [e.g. chrome, safari] Excel runtime(Edge)
  • Version [e.g. 22] No idea... internal to Excel

Additional context
The reason I tried to make this work is to avoid having to write a merge sort manually. :( JS is not my strong suite.

@risenW risenW added enhancement New feature or request help wanted Extra attention is needed labels Apr 2, 2025
@risenW
Copy link
Member

risenW commented Apr 2, 2025

@kozmaz87 Thanks for raising this. We need to take a second look at the way we handle merge. I think it can be optimized, and memory usage should not be that high.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request help wanted Extra attention is needed
Projects
None yet
Development

No branches or pull requests

2 participants