From d63f5923eaac96101f52f3c31f53ca8b149d4909 Mon Sep 17 00:00:00 2001 From: hamster1963 <1410514192@qq.com> Date: Fri, 22 Nov 2024 10:12:38 +0800 Subject: [PATCH] perf(global): use larger spacing to avoid high CPU usage --- app/(main)/ClientComponents/Global.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/(main)/ClientComponents/Global.tsx b/app/(main)/ClientComponents/Global.tsx index 384bdc1..a375488 100644 --- a/app/(main)/ClientComponents/Global.tsx +++ b/app/(main)/ClientComponents/Global.tsx @@ -82,7 +82,7 @@ export async function Global({ countries = [] }: GlobalProps) { // 获取国家的边界框 const bbox = turf.bbox(feature); - const spacing = 20; // 单位为千米,值越小点越密集 + const spacing = 40; // 单位为千米,值越小点越密集 const options = { units: "kilometers" }; // @ts-expect-error ignore const pointGrid = turf.pointGrid(bbox, spacing, options);