add options and postpone imports to massively reduce memory usage
This commit is contained in:
parent
0e5b10b586
commit
d7f175f7ef
12 changed files with 89 additions and 61 deletions
|
@ -7,7 +7,6 @@ from typing import Optional
|
|||
|
||||
import numpy as np
|
||||
from django.conf import settings
|
||||
from scipy.interpolate import NearestNDInterpolator
|
||||
from shapely import Geometry, MultiPolygon, prepared
|
||||
from shapely.geometry import GeometryCollection
|
||||
from shapely.ops import unary_union
|
||||
|
@ -68,6 +67,8 @@ class LevelRenderData:
|
|||
# todo: we should check that levels on top come before their levels as they should
|
||||
|
||||
themes = [None, *Theme.objects.values_list('pk', flat=True)]
|
||||
from scipy.interpolate import NearestNDInterpolator # moved in here to save memory
|
||||
|
||||
from c3nav.mapdata.render.theme import ColorManager
|
||||
|
||||
for theme in themes:
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue