cognitect / cognitect/transit-java
flush behavior during packing
Nobody has claimed this yet.
- Dominant language
- Java
- Stars
- 65
- Forks
- 23
- PR merge metrics
- No merged PRs in 30d
Description
Two issues popped up in transit-clj which are better recorded here:
- cognitect/transit-clj#43
- cognitect/transit-clj#46
The flushwriter flushes down the data from the output channel after serializing every single element of a data structure, causing a performance drop because the process will need to wait until the operating system forced every single newly serialized bit of data out onto the disk (or in the example of other streams, fragment it somehow on the network level).
I don't think the flush there is necessary but should move only to the end of the whole serialization process in write.
I would be happy to help or provide patches, just let me know. Thanks! :)
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with src/main/java/com/cognitect/transit/impl/AbstractEmitter.java at the referenced line and trace how write serializes a complete data structure. Confirm where FlushWriter currently flushes during element serialization and where write completes. Done means flushing is deferred until the whole serialization process ends, without changing the serialized output.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- java
- Domain
- backend, performance
- Issue type
- Bug
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 45/100