Skip to content

Optimization: RAW display block read#783

Merged
penguinolog merged 1 commit into
urwid:masterfrom
penguinolog:raw_input_optimizations
Feb 1, 2024
Merged

Optimization: RAW display block read#783
penguinolog merged 1 commit into
urwid:masterfrom
penguinolog:raw_input_optimizations

Conversation

@penguinolog
Copy link
Copy Markdown
Collaborator

Instead of reading per-byte, we can read per-chunk and make fewer read cycles. With chunk size 1024 bytes, we have almost 100% warranty of single-cycle buffer read

Checklist
  • I've ensured that similar functionality has not already been implemented
  • I've ensured that similar functionality has not earlier been proposed and declined
  • I've branched off the master or python-dual-support branch
  • I've merged fresh upstream into my branch recently
  • I've ran tox successfully in local environment
  • I've included docstrings and/or documentation and/or examples for my code (if this is a new feature)

Instead of reading per-byte, we can read per-chunk and make fewer read cycles.
With chunk size 1024 bytes, we have almost 100% warranty of single-cycle buffer read
@coveralls
Copy link
Copy Markdown

Pull Request Test Coverage Report for Build 7738568816

  • -22 of 27 (18.52%) changed or added relevant lines in 3 files are covered.
  • No unchanged relevant lines lost coverage.
  • Overall coverage decreased (-0.1%) to 70.968%

Changes Missing Coverage Covered Lines Changed/Added Lines %
urwid/display/_raw_display_base.py 1 3 33.33%
urwid/display/_posix_raw_display.py 2 12 16.67%
urwid/display/_win32_raw_display.py 2 12 16.67%
Totals Coverage Status
Change from base Build 7725240357: -0.1%
Covered Lines: 8769
Relevant Lines: 12447

💛 - Coveralls

@penguinolog penguinolog merged commit 102b3ba into urwid:master Feb 1, 2024
@penguinolog penguinolog deleted the raw_input_optimizations branch February 1, 2024 09:32
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants