mirror of
https://github.com/qelectrotech/qelectrotech-source-mirror.git
synced 2026-10-19 20:44:16 +02:00
Open with every folio built when the database must come from them
With QET_LAZY_FOLIOS=1, a project whose database cannot be filled from the file (folios or symbols with no saved uuid, two symbols sharing one, a folio number using %autonum, wires naming their ends the older way) had its folios left unbuilt, then built all at once while the database was filled from them. That is slower than building them as they are read: a 17 MB project reported on the pull request took 24.8 s to open instead of 19.2 s, and most files saved by an older version have no folio uuids. The file is now checked for those reasons before the folios are read; when one applies the project opens as without QET_LAZY_FOLIOS. The rarer reasons, which need the definitions or every folio's links, still fall back as before. tst_lazyfolios opens a copy of industrial.qet with one symbol's uuid given to another, and checks no folio is built after reading. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
@@ -512,6 +512,9 @@ class QETProject : public QObject
|
||||
const DiagramContext &information,
|
||||
const QHash<QString, QStringList> &titles_by_formula) const;
|
||||
bool m_deferring_folios = false;
|
||||
/// Opening with folios built only when needed: QET_LAZY_FOLIOS
|
||||
/// is set and the database can be filled from the document
|
||||
bool m_lazy_open = false;
|
||||
/// Saving may write a folio not built as it was read
|
||||
/// (writesKeptFolios()): the file is this version's, its
|
||||
/// database rows came from it, and nothing project-wide that
|
||||
|
||||
Reference in New Issue
Block a user