Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(java): avoid big object graph cause buffer take up too much memo…
…ry (#1397) There has been cases where Fury use too much memory: ![image](https://github.com/apache/incubator-fury/assets/12445254/b5e9d0cb-ea50-4615-a851-d4cf0ca9e594) This is caused by Fury held buffer. Fury holds a MemoryBuffer and write to it when users doesn't provide its own buffer. This held buffer can save memory copy since we don't have to grow buffer every time. But Fury never clear this buffer. If a big object tree is passed, the held buffer will take much memory even later object tree is small. This PR fix it by reset buffer when it's lager than 128Kb.
- Loading branch information