Repository navigation
Streaming API / Writing refactors #190
Replies: 3 comments 2 replies
|
Hi @Blackclaws, yes this sound interesting as long as these features were implement in a generic way, not application specific. If I may ask, for what you case did you add streaming write support? I guess #180 is a requirement for the streaming support, right? I have to review that first. |
|
They are generic, we are streaming a large amount of data from a postgres database into an S3 type backend via multipart uploads, so the datasets can then be downloaded as .h5. The dataset is too large to fit in RAM and multipart uploads require you to finish parts (at least 5Mb size) as a whole. Keeping those in Ram introduces the same problem meaning only streaming datasets in doesn't help if metadata isn't contiguous. The solution is to stream and use the Aggregated mode from #180 to keep Metadata blocks together. A number of other things had to be changed such as keeping global heap together and reducing overhead on numerous internal data structures to get below the RAM requirements we had. In the end writing got faster and uses less memory. I can try to divvy this up into a number of PRs splitting pure enhancements from the streaming approach which we also added later this might take a moment even with LLM assistance but I'd like to contribute it back if it helps others as well. |
|
I've split the changes into smaller PRs as suggested. All of them target Independent of the rest:
The writing stack:
The breaking changes are kept in PRs of their own, so they can be declined or held for 3.0.0 without blocking the rest. #200–#202 currently sit on #199. If you'd rather not take #199, I'll rebase them without it. 🤖 Generated with Claude Code |
Uh oh!
There was an error while loading. Please reload this page.
@Apollo3zehn Thought this might make sense to discuss first.
I've done further changes the PureHDF in our internal fork. Many improvements to memory usage / write speed that could potentially simply be applied here, but also a new streaming API that allows you to stream data into an H5 file that's being written to a stream, also covering groups and staying low on memory usage (depending on how many pending groups you have < 100Mb resident size for 1.2M datasets total).
Should I open PRs for all of these changes? It might make sense to get them into the 3.0.0 branch still if you're interested.
All reactions