Skip to content

Conversation

@macumber
Copy link
Collaborator

@macumber macumber commented Feb 26, 2024

Fixes #681 by moving optimizations in certain controllers to all controllers

@jmarrec
Copy link
Collaborator

jmarrec commented Mar 12, 2024

@macumber could you add a quick walkthrough of your code via review + some quick text explaining why removing the mutex is the right choice please?

bool m_itemsDraggable;
bool m_itemsRemoveable;
OSItemType m_type;
bool m_dirty;
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

m_dirty wasn't actually controlling anything here, all that refresh was doing was to clear m_dirty

delete m_reportItemsMutex;
}

void ConstructionObjectVectorController::reportItemsLater() {
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Only a few OSVectorController derived classes were specialized to have the reportItemsLater slot which schedules a call to OSVectorController::reportItems. This PR pulls that functionality into the OSVectorController. Now reportItems will schedule a call to a reportItemsImpl method that will run once so we don't report (and redraw) the same objects multipe times per execute loop.

openstudio::IddObjectType m_iddObjectType;
model::Model m_model;
bool m_showLocalBCL;
bool m_isLibrary;
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

m_showLocalBCL meant to show LocalBCL objects, basically just meant that this was a library controller, I thought m_isLibrary was more clear.

Copy link
Collaborator

@jmarrec jmarrec left a comment

Choose a reason for hiding this comment

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

Not sure I follow everything but I trust your judgment.

@jmarrec jmarrec merged commit 40b6069 into develop Mar 25, 2024
@jmarrec jmarrec deleted the speed_up_controllers_681 branch March 25, 2024 08:25
@github-actions github-actions bot locked and limited conversation to collaborators Mar 25, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Dragging construction set from library is very slow

2 participants