8000 fix(transformer): reduce memory consumption by Endebert · Pull Request #639 · cfug/dio · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

fix(transformer): reduce memory consumption #639

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

Merged
merged 1 commit into from
Feb 24, 2020
Merged

fix(transformer): reduce memory consumption #639

merged 1 commit into from
Feb 24, 2020

Conversation

Endebert
Copy link
Contributor
@Endebert Endebert commented Jan 9, 2020

New Pull Request Checklist

  • I have read the Documentation
  • I have searched for a similar pull request in the project and found none
  • I have updated this branch with the latest master to avoid conflicts (via merge from master or rebase)
  • I have added the required tests to prove the fix/feature I am adding
  • I have updated the documentation (if necessary)
  • I have run the tests and they pass

This merge request fixes / refers to the following issues:

Fixes #578

Pull Request Description

Instead of using a large List<int>, I keep references to the data chunks and at the very end create a Uint8List and fill it with the chunks. This seems to reduce memory allocation considerably.

Instead of using a large `List<int>`, I keep references to the data chunks and at the very end create a `Uint8List` and fill it with the chunks. This seems to reduce memory allocation considerably.

Fixes #578
@Endebert
Copy link
Contributor Author

Could someone please take a look at this? I'd love to tick the remaining checkboxes, but I don't even know how to run the tests for this project.

We use this fix in production and it seems stable. Would be great if this could be merged...

@wendux wendux merged commit a2a8424 into cfug:master Feb 24, 2020
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.

Too much memory allocation when using non stream responses
2 participants
0