提升暴雨产图效率

This commit is contained in:
wzy-warehouse
2026-06-21 14:52:23 +08:00
parent 5169ed2f33
commit 3e0f5a94cb
47 changed files with 513 additions and 188 deletions
+2 -2
View File
@@ -41,12 +41,12 @@ class MapService:
t0 = time.time()
if is_cache_hit:
logger.info(f"[缓存命中] {template_name}")
project.clear()
project, texts, extent = template_cache.restore_template(template_path)
template_cache.reset_project_state(project, texts, extent)
# FlagDontResolveLayers 跳过了数据库连接,手动触发 PostgreSQL 图层解析
self._resolve_postgres_layers(project)
else:
logger.info(f"[首次加载] {template_name}")
project.clear()
modifier = TemplateModifier(self.config)
actual_path = modifier.modify(template_path)
project.read(actual_path)