Istvan Soos
2017-10-11 10:19:11 UTC
I've encountered this over the past few months several times, and I
have no clue how to debug or resolve it:
Case 1: Reading a large file (> 10GB) line-by-line.
Case 2: Running a 'SELECT * FROM table;' in Postgres (>1M rows).
In both cases, the individual lines or rows are not too large, usually
a few hundreds of kilobytes max, and the related processing is not
that big deal either, mostly some kind of aggregation which may have
an async component in it.
However, when that async processing takes a bit more time, the IO
operations can fill up the buffers, and the memory consumption becomes
much more than it should be (e.g. in the 10 GBs instead of a few
hundred MB).
What is the proper way (or best practice) to apply back-pressure, so
that the source does not floods the memory?
What can we do, if the source is a third-party library that doesn't do
the ideal thing (e.g. may not propagate pause)?
Thanks,
Istvan
have no clue how to debug or resolve it:
Case 1: Reading a large file (> 10GB) line-by-line.
Case 2: Running a 'SELECT * FROM table;' in Postgres (>1M rows).
In both cases, the individual lines or rows are not too large, usually
a few hundreds of kilobytes max, and the related processing is not
that big deal either, mostly some kind of aggregation which may have
an async component in it.
However, when that async processing takes a bit more time, the IO
operations can fill up the buffers, and the memory consumption becomes
much more than it should be (e.g. in the 10 GBs instead of a few
hundred MB).
What is the proper way (or best practice) to apply back-pressure, so
that the source does not floods the memory?
What can we do, if the source is a third-party library that doesn't do
the ideal thing (e.g. may not propagate pause)?
Thanks,
Istvan
--
For other discussions, see https://groups.google.com/a/dartlang.org/
For HOWTO questions, visit http://stackoverflow.com/tags/dart
To file a bug report or feature request, go to http://www.dartbug.com/new
---
You received this message because you are subscribed to the Google Groups "Dart Misc" group.
To unsubscribe from this group and stop receiving emails from it, send an email to misc+***@dartlang.org.
For other discussions, see https://groups.google.com/a/dartlang.org/
For HOWTO questions, visit http://stackoverflow.com/tags/dart
To file a bug report or feature request, go to http://www.dartbug.com/new
---
You received this message because you are subscribed to the Google Groups "Dart Misc" group.
To unsubscribe from this group and stop receiving emails from it, send an email to misc+***@dartlang.org.