View Issue Details

IDProjectCategoryView StatusLast Update
0005935DarkRadiantGeneralpublic17.04.2022 05:08
Reporterjonri Assigned Toorbweaver  
PrioritynormalSeveritynormalReproducibilityalways
Status resolvedResolutionfixed 
PlatformLinux 
Product Version3.0.0 
Fixed in Version3.0.0 
Summary0005935: Reload Defs takes longer every time
DescriptionEvery time you call Reload Defs, it takes twice as long as the time before it. In an empty map it starts getting bad after 7-8 reloads; in a real map it's no longer practical to use after just a few.
Steps To Reproduce1. Call File -> Reload Defs
2. Goto 1
TagsNo tags attached.

Activities

orbweaver

orbweaver

12.04.2022 19:55

developer   ~0014799

Confirmed on Linux. The stack trace is showing code related to EntityClass::setColour/resetColour. Perhaps some kind of recursive signal explosion.
orbweaver

orbweaver

13.04.2022 19:29

developer   ~0014800

Fixed in c0889d6bf0790fc63ca02b3fd53df194049a574d

Related Changesets

DarkRadiant: master c0889d6b

2022-04-13 19:20:05

orbweaver

Details Diff
0005935: fix progressive performance loss in "Reload Defs"

When "Reload Defs" is invoked, the resolveInheritance() method is called
again on entity classes, however the code in this method was not
prepared for being called more than once, and set up a new sigc++
connection to the parent's changedSignal() each time. The resulting
linearly-increasing number of connections gave rise to steadily
worsening performance as the "Reload Defs" command was repeated, as
entities redundantly responded to their parent's setColour/resetColour
operation.

We now store the sigc::connection in the EntityClass itself so that the
previous connection can be disconnected before making a new one. As a
further performance optimisation, the setColour() method only emits the
changed signal if the colour actually changed, which massively reduces
the number of unnecessary method calls.
Affected Issues
0005935
mod - radiantcore/eclass/EntityClass.cpp Diff File
mod - radiantcore/eclass/EntityClass.h Diff File

Issue History

Date Modified Username Field Change
09.04.2022 12:32 jonri New Issue
09.04.2022 15:51 greebo Status new => acknowledged
12.04.2022 19:55 orbweaver Assigned To => orbweaver
12.04.2022 19:55 orbweaver Status acknowledged => confirmed
12.04.2022 19:55 orbweaver Note Added: 0014799
12.04.2022 20:33 orbweaver Status confirmed => assigned
13.04.2022 19:29 orbweaver Status assigned => resolved
13.04.2022 19:29 orbweaver Resolution open => fixed
13.04.2022 19:29 orbweaver Fixed in Version => 3.0.0
13.04.2022 19:29 orbweaver Note Added: 0014800
17.04.2022 05:08 orbweaver Changeset attached => DarkRadiant master c0889d6b