From 46173fb5df7b656c0bbab67d7c514b477d2f3607 Mon Sep 17 00:00:00 2001 From: Wires77 Date: Mon, 15 Dec 2025 10:42:20 +0000 Subject: [PATCH] Apply changes from https://github.com/PathOfBuildingCommunity/PathOfBuilding/pull/9186 --- src/Modules/Common.lua | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/src/Modules/Common.lua b/src/Modules/Common.lua index 76f6ec96e3..9dfc78ca1b 100644 --- a/src/Modules/Common.lua +++ b/src/Modules/Common.lua @@ -42,6 +42,19 @@ if launch.devMode and profiler == nil then ConPrintf("Unable to Load Profiler") end +-- Optimize coroutines to run at full framerate +local co_create = coroutine.create +local active_coroutines = setmetatable({}, { __mode = "k" }) +function coroutine.create(func) + local co = co_create(func) + active_coroutines[co] = true + return co +end + +function coroutine._list() + return active_coroutines +end + -- Class library common.classes = { } local function addSuperParents(class, parent)