Skip to content

Conversation

@gadfort
Copy link
Collaborator

@gadfort gadfort commented Dec 25, 2025

Changes:

  • save bpins in rtree
  • only compute boundingRect as needed.
  • allow bpins to be selected

Before:

io pins setup 11.7252 sec
total render 19.7406 sec

After:

io pins setup 669.115 msec
total render 9.92228 sec (majority of this time is still drawing the arrows: 8.46995 sec)

gadfort and others added 3 commits December 24, 2025 19:19
@gadfort gadfort requested a review from maliberty December 25, 2025 16:40
Copy link
Contributor

@gemini-code-assist gemini-code-assist bot left a comment

Choose a reason for hiding this comment

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

Code Review

This pull request significantly improves the performance of handling and rendering bpins by leveraging an r-tree for spatial queries, which is a great enhancement. The new feature to allow bpin selection is also a valuable addition. The code changes are generally well-structured. However, I've identified a critical performance and logic issue in setupIOPins concerning font size calculation, and another bug in drawIOPins that incorrectly prevents pin markers from being drawn. I have provided detailed comments and suggestions to address these points. With these fixes, the PR will be in excellent shape.

Comment on lines +1643 to 1645
if (!viewer_->options_->areIOPinsVisible()
|| !viewer_->options_->areIOPinNamesVisible()) {
return;
Copy link
Contributor

Choose a reason for hiding this comment

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

high

This check incorrectly prevents IO pin markers from being drawn if pin names are not visible. The visibility of pin markers is controlled by areIOPinsVisible(), while the visibility of names is handled by the pin_draw_names_ flag later in the code. The || !viewer_->options_->areIOPinNamesVisible() part of the condition should be removed to ensure markers are drawn whenever IO pins are set to be visible, regardless of the name visibility setting.

  if (!viewer_->options_->areIOPinsVisible()) {

Copy link
Contributor

@github-actions github-actions bot left a comment

Choose a reason for hiding this comment

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

clang-tidy made some suggestions

@maliberty maliberty merged commit 7d543e4 into The-OpenROAD-Project:master Dec 25, 2025
12 of 13 checks passed
@gadfort gadfort deleted the speedup-pins branch December 25, 2025 21:08
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