Repository navigation
Replies: 1 comment
|
Does the database drift out of step with the drawings? Not today. What changes with #1142:
So it stays correct for the same reason it always has: whenever anything changes, it is refilled from the drawings. Then why read the file at all? Today it makes no difference. It only matters for a possible later change: opening big projects faster by not drawing every folio at once. Folios not drawn yet cannot be read, so the database would have to come from the file. This PR is the first piece of that. The catch: once some folios are not drawn, "refill from the drawings" no longer works. Something new would be needed to keep the database and the drawings in step, and that is not designed yet. In short: nothing new can drift today, because the old safety net still works. The PR is only useful if faster opening is built later, and that would need a new way to stay in step. Is faster opening worth pursuing? If this is a reply in #1141, the project's writing guide says discussion replies should stay under about 80 words. A shorter version: Nothing can drift today: #1142 only changes the fill at open. After any edit the database is refilled from the drawn folios, as before. Reading the file matters only if big projects later open without drawing every folio. Then "refill from the drawings" stops working, and keeping the two in step would need something new that isn't designed yet. Is faster opening worth pursuing? |
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Opening a project builds every folio in memory before showing one — about 0.07 s per folio, so 30 s or more for a few hundred folios. The project database (the one behind parts lists, summary tables and the wiring list) is then filled by walking those built folios. That order is what prevents opening a big project without building every folio: the database is the one place that could answer "what is on folio 87?" without building it, but it can only be filled once folio 87 is built.
I checked how much of the database the
.qetfile alone can give, with a small script that fills the same tables from the file and compares them with QElectroTech's own, on the 24 example projects:K%total-%idis saved asK1-1and shown asK3-1). So these are worked out again from the file, by the same code the folios use, and match every time;So the proposal is a change nobody would see: at open, fill the database from the file for everything above, and from the built folios only for shapes, texts and pictures (text sizes need fonts). It is built as a PR (linked below), with a test that fills it both ways on the examples and requires the same result. Opening does not get faster yet — it only removes the ordering that stops it from getting faster later.
Questions:
PR: #1142
All reactions