Skip to content

PluginList::refresh speedup#2046

Merged
Holt59 merged 3 commits intoModOrganizer2:masterfrom
Liderate:PluginList_refresh-speedup
Jun 10, 2024
Merged

PluginList::refresh speedup#2046
Holt59 merged 3 commits intoModOrganizer2:masterfrom
Liderate:PluginList_refresh-speedup

Conversation

@Liderate
Copy link
Contributor

This change should decrease the time it takes to refresh the plugin list, particularly for Fallout 4 and Starfield instances where the loadOrderMechanism call is costly.

I tested by enabling/disabling an empty mod in a Fallout 4 instance containing about 2000 dummy ESMs and ESPs. The loadOrderMechanism change saw the average time decrease from 2900ms to 710ms. The other changes further reduced that to 210ms.

@Holt59 Holt59 merged commit fff03d3 into ModOrganizer2:master Jun 10, 2024
continue;
}
QString filename = ToQString(current->getName());
const QString& filename = ToQString(current->getName());
Copy link
Member

Choose a reason for hiding this comment

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

It's not important, but for future reference, the change to this line does nothing. ToQString returns a QString, not a const QString&, so a QString has to be constructed in this stack frame anyway. There's no copy happening in the old or new version due to copy elision.

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.

3 participants