Speed up opening big projects with lazy folios

This commit is contained in:
Laurent Trinques
2026-10-13 11:01:21 +02:00
parent a78e95be2c
commit 77e2a9bfc5
45 changed files with 3956 additions and 388 deletions
+9
View File
@@ -1011,6 +1011,15 @@ bool TerminalStrip::fromXml(QDomElement &xml_element)
auto xml_layout = xml_element.firstChildElement(QStringLiteral("layout"));
if (!xml_layout.isNull())
{
//The folios holding its terminals are built (QET_LAZY_FOLIOS):
//a strip is read with the project, before the database could
//tell where any symbol is
QSet<QUuid> terminals;
const QDomNodeList xml_reals = xml_layout.elementsByTagName(RealTerminal::xmlTagName());
for (int i = 0 ; i < xml_reals.size() ; ++i)
terminals.insert(QUuid(xml_reals.at(i).toElement().attribute(QStringLiteral("element_uuid"))));
m_project->buildFoliosHoldingSymbols(terminals);
//Get all free elements terminal of the project
const ElementProvider ep(m_project);
auto free_terminals = ep.freeTerminal();