diff options
Diffstat (limited to 'src')
| -rw-r--r-- | src/qml/memory/qv4mm.cpp | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/src/qml/memory/qv4mm.cpp b/src/qml/memory/qv4mm.cpp index d740969131..f43858f31e 100644 --- a/src/qml/memory/qv4mm.cpp +++ b/src/qml/memory/qv4mm.cpp @@ -1461,7 +1461,15 @@ void MemoryManager::collectFromJSStack(MarkStack *markStack) const GCStateMachine::GCStateMachine() { // base assumption: target 60fps, use at most 1/3 of time for gc - timeLimit = std::chrono::milliseconds { (1000 / 60) / 3 }; + // unless overridden by env variable + bool ok = false; + auto envTimeLimit = qEnvironmentVariableIntValue("QV4_GC_TIMELIMIT", &ok ); + if (!ok) + envTimeLimit = (1000 / 60) / 3; + if (envTimeLimit > 0) + timeLimit = std::chrono::milliseconds { envTimeLimit }; + else + timeLimit = std::chrono::milliseconds { 0 }; } void GCStateMachine::transition() { |
