Skip to content

Improved performance by caching jinxed.tparm calls - #404

Merged
jquast merged 3 commits into
masterfrom
jq/memoize-tparm
Aug 29, 2026
Merged

jquast merged 3 commits into
masterfrom
jq/memoize-tparm

Conversation

@jquast

@jquast jquast commented Aug 29, 2026 •

Copy link
Copy Markdown
Owner

This is a more general-purpose version of #403 by @btpence, to improve performance of repeated calls to jinxed.tparm, like the many move_yx() calls done in bin/scroller.py.

A few releases ago, we used python's curses.tparm on linux, which was faster but not as portable or thread-safe as our pure python tparm() in jinxed.

@codspeed

codspeed Bot commented Aug 29, 2026 •

Copy link
Copy Markdown

Merging this PR will not alter performance

✅ 28 untouched benchmarks
🆕 2 new benchmarks

Performance Changes

Benchmark BASE HEAD Efficiency
🆕 test_color_256 N/A 2.4 ms N/A
🆕 test_move_yx_full_screen N/A 10.3 ms N/A

Comparing jq/memoize-tparm (3ea97d9) with master (2c11362)

Open in CodSpeed

@codecov

codecov Bot commented Aug 29, 2026 •

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 97.35%. Comparing base (2c11362) to head (3ea97d9).

Additional details and impacted files
@@           Coverage Diff           @@
##           master     #404   +/-   ##
=======================================
  Coverage   97.34%   97.35%           
=======================================
  Files          13       13           
  Lines        3808     3820   +12     
  Branches      676      677    +1     
=======================================
+ Hits         3707     3719   +12     
  Misses         82       82           
  Partials       19       19           

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

jquast added 2 commits August 29, 2026 11:08
This is a more general-purpose version of #403 by @btpence, to improve
performance of repeated calls to jinxed.tparm, like many move_yx()
calls.

A few releases ago, we used python's curses.tparm, which was faster but
not as portable or thread-safe as our pure python tparm() in jinxed.
@jquast
jquast merged commit 6c4d690 into master Aug 29, 2026
16 checks passed
@jquast
jquast deleted the jq/memoize-tparm branch August 29, 2026 15:35
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant