Feature request: `Async` codec

未关闭
#123 0 条评论 0 个 reaction 已指派 0 人 在 GitHub 查看

还没有人认领这个 Issue。

评估

难度
5/5
预计耗时
一周以上
新手友好度
35/100
Issue 类型
功能
描述清晰度
基本清楚
活跃度
停滞
技术栈
julia
领域
data, performance

调研方向

首先检查 TranscodingStreams 的 codec 接口以及现有解压和压缩 codec 的行为。定义 Async wrapper 将如何协调其输入、内部缓冲区和输出,同时确保转码在另一个 task 中运行。当所提出的 codec 能够与任意 TranscodingStreams codec 一起工作,并保持预期的 stream 行为时,即视为完成。

由索引模型根据 Issue 内容生成。

描述

As far as I can tell, TranscodingSteams (TS) is currently mostly used for de/compression codecs, which are quite CPU-intensive. In this case it would be beneficial to allow the de/compression to happen in a separate thread concurrently.

I think this can be solved by having an Async codec that wraps any TS, such that the underlying stream's transcoding happens in another thread. More specifically, Async could carry an internal buffer B along with its input (I) and output (O) buffers. When O runs dry, it will copy data from B to O, then schedule the transcoding from I to B.

I believe this codec should be in TS and not a separate package because:

  1. It's near-universally useful for users of TS
  2. The Async codec might have to reach into TS's internals for efficiency, to make sure the underlying TS really does run its transcoding in a different task.
主要语言
Julia
星标
90
派生
26
PR 合并指标
30 天内没有已合并 PR

环境准备

这个项目没有提供开发容器、Dockerfile 或贡献指南,环境需要你自己搭建:先看它的 README,通用步骤见我们的新手贡献指南。

从这里开始

  1. 先读完整个 Issue,再读项目的贡献指南。
  2. 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
  3. Fork 仓库,在一个分支上完成修改。
  4. 提交 Pull Request,并在描述里引用这个 Issue 编号。

JuliaIO/TranscodingStreams.jl 的其他 Issue

查看 JuliaIO/TranscodingStreams.jl 的全部 Issue

相似的 Issue

更多 Julia Issue

把新 issue 发到你的邮箱

精选适合新手参与的 GitHub issue 摘要。