cherry-pick "Changes to support streaming - yay for reduced memory usage" (and lazily ignore the tests)