Disable Mac initial startup delay
This commit is contained in:
@@ -172,43 +172,43 @@ public class RenderParams extends DhApiRenderParam
|
||||
}
|
||||
|
||||
|
||||
// potential fix for a segfault when
|
||||
// Sodium and DH are running together
|
||||
if (EPlatform.get() == EPlatform.MACOS
|
||||
&& !initialLoadingComplete)
|
||||
{
|
||||
// Once MC starts rendering, wait a few seconds so
|
||||
// MC/Sodium can finish their shader compiling before DH does its own.
|
||||
// This will allow DH to compile its own shaders after Sodium finishes
|
||||
// compiling its own.
|
||||
long nowMs = System.currentTimeMillis();
|
||||
long firstAllowedRenderTimeMs = firstRenderTimeMs + TIME_FOR_MAC_TO_FINISH_COMPILING_IN_MS;
|
||||
if (nowMs < firstAllowedRenderTimeMs)
|
||||
{
|
||||
return "Waiting for initial MC compile...";
|
||||
}
|
||||
|
||||
|
||||
// null shouldn't happen, but just in case
|
||||
PriorityTaskPicker.Executor renderLoadExecutor = ThreadPoolUtil.getRenderLoadingExecutor();
|
||||
if (renderLoadExecutor == null)
|
||||
{
|
||||
return "Waiting for DH Threadpool...";
|
||||
}
|
||||
|
||||
// wait for DH to finish loading, by the time that's done
|
||||
// java should have finished all of DH's JIT compiling,
|
||||
// which will hopefully mean less concurrency and thus a lower
|
||||
// chance of breaking
|
||||
// (plus this gives Sodium/vanill a bit longer to finish their setup)
|
||||
int taskCount = renderLoadExecutor.getQueueSize();
|
||||
if (taskCount > 0)
|
||||
{
|
||||
return "Waiting for DH JIT compiling...";
|
||||
}
|
||||
|
||||
initialLoadingComplete = true;
|
||||
}
|
||||
//// potential fix for a segfault when
|
||||
//// Sodium and DH are running together
|
||||
//if (EPlatform.get() == EPlatform.MACOS
|
||||
// && !initialLoadingComplete)
|
||||
//{
|
||||
// // Once MC starts rendering, wait a few seconds so
|
||||
// // MC/Sodium can finish their shader compiling before DH does its own.
|
||||
// // This will allow DH to compile its own shaders after Sodium finishes
|
||||
// // compiling its own.
|
||||
// long nowMs = System.currentTimeMillis();
|
||||
// long firstAllowedRenderTimeMs = firstRenderTimeMs + TIME_FOR_MAC_TO_FINISH_COMPILING_IN_MS;
|
||||
// if (nowMs < firstAllowedRenderTimeMs)
|
||||
// {
|
||||
// return "Waiting for initial MC compile...";
|
||||
// }
|
||||
//
|
||||
//
|
||||
// // null shouldn't happen, but just in case
|
||||
// PriorityTaskPicker.Executor renderLoadExecutor = ThreadPoolUtil.getRenderLoadingExecutor();
|
||||
// if (renderLoadExecutor == null)
|
||||
// {
|
||||
// return "Waiting for DH Threadpool...";
|
||||
// }
|
||||
//
|
||||
// // wait for DH to finish loading, by the time that's done
|
||||
// // java should have finished all of DH's JIT compiling,
|
||||
// // which will hopefully mean less concurrency and thus a lower
|
||||
// // chance of breaking
|
||||
// // (plus this gives Sodium/vanill a bit longer to finish their setup)
|
||||
// int taskCount = renderLoadExecutor.getQueueSize();
|
||||
// if (taskCount > 0)
|
||||
// {
|
||||
// return "Waiting for DH JIT compiling...";
|
||||
// }
|
||||
//
|
||||
// initialLoadingComplete = true;
|
||||
//}
|
||||
|
||||
|
||||
return null;
|
||||
|
||||
Reference in New Issue
Block a user