mirror of
https://github.com/GSA/notifications-admin.git
synced 2026-07-18 21:44:11 -04:00
Make calculating overlapping areas faster
By using the simplified polygons instead of the full resolutions ones we: - query less data from SQLite - pass less data around - give Shapely a less complicated shape to do its calculations on This makes it faster to calculate how much of each electoral ward a custom area overlaps. For the two areas in our tests: Place represented by custom area | Before | After ---------------------------------|--------|-------- Bristol | 0.07s | 0.02s Skye | 0.02s | 0.01s
This commit is contained in:
@@ -377,7 +377,7 @@ def test_estimated_bleed(
|
||||
'Stoke Bishop',
|
||||
'Windmill Hill',
|
||||
],
|
||||
73_496,
|
||||
73_119,
|
||||
),
|
||||
(
|
||||
SKYE,
|
||||
@@ -387,7 +387,7 @@ def test_estimated_bleed(
|
||||
'Na Hearadh agus Ceann a Deas nan Loch',
|
||||
'Wester Ross, Strathpeffer and Lochalsh',
|
||||
],
|
||||
3_517,
|
||||
3_534,
|
||||
),
|
||||
))
|
||||
def test_count_of_phones_for_custom_area(
|
||||
|
||||
Reference in New Issue
Block a user