mirror of
https://github.com/qelectrotech/qelectrotech-source-mirror.git
synced 2026-07-30 07:44:13 +02:00
139c47d1ce
createElement() ran a full pugixml parse of the element definition for every instance, only to read the link_type attribute for the subclass dispatch - on a big example project (191 instances) 49 ms of the load, measured with temporary instrumentation. The QDom definition is already cached and the ctor uses it anyway; reading the attribute there costs ~17 ms in total, so the net win is ~30 ms - within run-to-run noise end-to-end, but it removes an entire redundant parser pass per element. Behavior unchanged: an absent and an empty link_type both fell through to SimpleElement before and still do. (cherry picked from commit d63275971f558c8ac59f35bf4d13d7e424682342)