Skip to content

Improve DearPyGui result grid performance - #80

Merged
shobhit-seg merged 1 commit into
mainfrom
codex/improve-result-grid-performance
Aug 4, 2026
Merged

shobhit-seg merged 1 commit into
mainfrom
codex/improve-result-grid-performance

Conversation

@shobhit-seg

Copy link
Copy Markdown
Contributor

Summary

  • render query results in bounded 100-row pages with a 1,000-row display cap while preserving complete JSON exports
  • replace nested read-only input widgets with lightweight click-to-copy selectable cells
  • build query and Explorer rows in 20-row chunks and apply a per-frame UI callback budget
  • enable Explorer table clipping and discard stale render chunks

Controlled benchmark

  • previous 1,000x20 query grid: about 161 ms and 41,022 DearPyGui items
  • new 1,500-row stored result: 0.85 ms page setup, five 1.19-1.32 ms chunks, and 2,133 displayed items

These are controlled widget-construction measurements, not production query-latency guarantees.

Validation

  • 133 tests passed
  • Ruff check passed
  • Ruff format check passed
  • compileall passed
  • query and Explorer DearPyGui smoke construction passed
  • git diff check passed

@shobhit-seg
shobhit-seg requested a review from abhi204 August 4, 2026 11:40
@shobhit-seg
shobhit-seg added this pull request to the merge queue Aug 4, 2026
Merged via the queue into main with commit 1c825a9 Aug 4, 2026
1 check passed
@shobhit-seg
shobhit-seg deleted the codex/improve-result-grid-performance branch August 4, 2026 11:43
@abhi204

abhi204 commented Aug 4, 2026

Copy link
Copy Markdown

🤖 AI pre-review — posted by Claude Code on behalf of @abhi204 (model: claude-opus-4-8). Not a formal review; @abhi204 still signs off.

No blocking issues found. Checked for bugs, security, and CLAUDE.md compliance.

Notes from the review (no action needed):

  • Generation-based cancellation (render_generation, _active_table_tag) correctly discards stale row chunks on page navigation and new queries.
  • Tag counters stay in sync: _render_result_page builds group tags from table_counter + 1 and _setup_results_table increments to the same value; the prior group is deleted first, so no tag collisions across pages.
  • JSON export stays complete: _convert_results_to_json iterates full last_query_results uncapped/untruncated, and cell copy uses the full original_cell while only the display label is truncated.
  • async_worker is wired on both TabbedQueryInterface and DataExplorer; the None fallback renders synchronously.

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.

2 participants