Skip to content

Draft: Avoid going deeper if not needed - #48

Open
lukaselmer wants to merge 1 commit into
kesla:masterfrom
lukaselmer:patch-1
Open

Draft: Avoid going deeper if not needed#48
lukaselmer wants to merge 1 commit into
kesla:masterfrom
lukaselmer:patch-1

Conversation

@lukaselmer

Copy link
Copy Markdown

I'm running out of memory when sorting a big, deep, json file. I noticed that even though I set depth to a small number, I'm still running out of memory.

The proposed performance optimization stops the recursion when the depth is reached. This should

  • use less memory
  • compute faster

The proposed solution is not tested (yet), that's why I marked it as a draft. I'm also not sure if it is on purpose to reverse the keys even when the depth is reached => if it's a bug, then && !reverse can be removed to fix the bug.

@kesla what are your thoughts on this?

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.

1 participant