Skip to content

perf: skip redundant coordinator state resets + bump version to 0.4.9 - #62

Merged
Qubitium merged 2 commits into
mainfrom
devin/optimize-rendering-latency-4
Jul 27, 2026
Merged

perf: skip redundant coordinator state resets + bump version to 0.4.9#62
Qubitium merged 2 commits into
mainfrom
devin/optimize-rendering-latency-4

Conversation

@Qubitium

@Qubitium Qubitium commented Jul 27, 2026

Copy link
Copy Markdown
Contributor

Summary

This PR contains two changes:

  1. Performance: Reduce per-row logging/column overhead by shrinking the count == 0 fast path in _clear_progress_stack_locked. When there is no rendered progress stack, the function only needs to restore cursor visibility and flush any deferred log records. It was also re-clearing six coordinator state fields on every log/column row even though those fields are reset when the stack is actually cleared by the render paths. Dropping those redundant __setattr__ calls removes a measurable chunk of per-row latency for the column and log APIs.
if count == 0:
    if show_cursor:
        _set_cursor_visibility_locked(True, backend_state=state)
    if flush_deferred_logs and not for_log_output:
        _flush_deferred_logs_locked()
    return
  1. Version: Bump pyproject.toml version from 0.4.8 to 0.4.9.

Profiling

Local cProfile harness (1000 iterations per API, 120 columns):

API Before this pass After this pass
progress snapshot 0.076 s 0.077 s
progress iter 0.094 s 0.090 s
columns 0.138 s 0.126 s
logs 0.064 s 0.058 s

Progress paths are essentially unchanged; column and log paths gain ~9% and ~10% respectively.

All 141 tests pass locally.

Link to Devin session: https://app.devin.ai/sessions/45e5067b04374a8381566d710d0311da
Requested by: @Qubitium

@Qubitium Qubitium self-assigned this Jul 27, 2026
@devin-ai-integration

Copy link
Copy Markdown

🤖 Devin AI Engineer

I'll be helping with this pull request! Here's what you should know:

✅ I will automatically:

  • Address comments on this PR. Add '(aside)' to your comment to have me ignore it.
  • Look at CI failures and help fix them

Note: I can only respond to comments from users who have write access to this repository.

⚙️ Control Options:

  • Disable automatic comment, CI, and merge conflict monitoring

@devin-ai-integration
devin-ai-integration Bot force-pushed the devin/optimize-rendering-latency-4 branch from 17048c0 to a8db2a0 Compare July 27, 2026 03:43
@devin-ai-integration devin-ai-integration Bot changed the title perf: skip redundant coordinator state resets on empty progress stack perf: skip redundant coordinator state resets + bump version to 0.4.9 Jul 27, 2026

@devin-ai-integration devin-ai-integration Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

✅ Devin Review: No Issues Found

Devin Review analyzed this PR and found no bugs or issues to report.

Open in Devin Review

@Qubitium
Qubitium merged commit 2f7a997 into main Jul 27, 2026
26 checks passed
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