add options and postpone imports to massively reduce memory usage

This commit is contained in:
Laura Klünder 2024-02-07 18:17:13 +01:00
parent 0e5b10b586
commit d7f175f7ef
12 changed files with 89 additions and 61 deletions

View file

@ -11,7 +11,6 @@ from django.urls import reverse
from django.utils.functional import cached_property
from django.utils.text import format_lazy
from django.utils.translation import gettext_lazy as _
from scipy.sparse.csgraph._shortest_path import dijkstra
from shapely import prepared
from shapely.affinity import scale
from shapely.geometry import JOIN_STYLE, LineString, MultiPolygon
@ -352,6 +351,7 @@ class AltitudeArea(LevelGeometryMixin, models.Model):
repeat = True
from scipy.sparse.csgraph._shortest_path import dijkstra
while repeat:
repeat = False
# noinspection PyTupleAssignmentBalance