north-road / qgis-redistricting-plugin

LINZ 2018-19 Electoral Redistricting Application
https://www.linz.govt.nz
GNU General Public License v2.0
2 stars 5 forks source link

Hangup when Branching to new scenario #168

Open gbyrom opened 5 years ago

gbyrom commented 5 years ago

The application is "hanging" when branching to a new scenario.

I think this might be to do with the fact that my current scenario has a new electorate with meshblocks assigned to it (previously, the new electorate was already in the database, but didn't have any meshblocks assigned). Now, in the new scenario, it has to allocate those meshblocks to the new electorate - but perhaps can't do that for some reason - possibly because it wasn't expecting the new electorate ID that they've been assigned to? SYmptom is the "Branching scenario" dialog box stays on-screen, and is "not responding". Previously this dialog box would go away quickly, and the branching process then ran after that.

gbyrom commented 5 years ago

OK, this may not be quite as much of a problem as I first thought. I left it runnig overnight and it DID eventually branch to a new scenario. No idea what time it completed!

gbyrom commented 4 years ago

Something strange has happened here. All of a sudden, branching to a new scenario takes no time at all. I haven't changed anything in the plugin, although I have edited the database to remove a whole load of old scenarios that were no longer needed, but I doubt that would've done it. In addition, it doesn't seem to switch to the new scenario any more. It did before! The new scenario is certainly created but the scenario_id in the Electorates table is still that of the scenario you're branching FROM.

gbyrom commented 4 years ago

OK more info here as I've done some testing:

nyalldawson commented 4 years ago

Hmm - I can't reproduce this one. I would suggest making a copy of the database, and then running a "vacuum" operation over it. (This can be done by right-clicking it in the QGIS browser window). Let me know if that improves the branching speed...