Skip to content

⚑ Improve the performance of the tui app #48

@neon-mmd

Description

@neon-mmd

Work Expected From The Issue

Provide several optimizations to improve the performance of the video playback by making the following changes:

  • Use an alternative allocator like mimalloc to improve the performance of the TUI app.
  • Enable gzip, brotli and http dynamic window size features on the reqwest client to speed up downloads.
  • Use rayon to parallalize coloring and drawing work of frames both of videos and images to speed up video playback performance dramatically.
  • Make stdout buffered using BufWriter.
  • Improve file reads using BufReader.
  • Replace gifs & gifs-dispose crate with opencv as using the prior gives poor performance and causes occasional video stutters.
  • Replace fast-image-resize code with image code which internally uses rayon by default.
  • Provide more optimised release build and debug build profiles.

The issue expects the following files to be changed/modified:

  • src/common/errors.rs
  • src/main.rs
  • src/pipeline/frames.rs
  • src/pipeline/image_pipeline.rs
  • src/pipeline/runner.rs
  • src/terminal/mod.rs
  • Cargo.toml

Note

All the files that are expected to be changed are located under the codebase (tplay directory).

Reason Behind These Changes

The reason behind having these changes is to improve the performance of the TUI app which can improve the performance of downloads and video playback, which can drastically improve the user experience.

Do you want to work on this issue?

Yes

Additional information

No response

Metadata

Metadata

Assignees

Labels

No labels
No labels

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions