Files
UnrealEngineUWP/Engine/Source/Runtime/Core
kevin macaulayvacher e897ddf724 AsyncCompilationHelper - Remove 16ms main thread sleep that happens per incomplete task and instead favours polling all tasks and sleeping once if not all tasks are complete.
ICompilable WaitCompletionWithTimeout () method is now documented to poll if given a 0 TimeLimitSeconds. To adjust for this, implementers of ICompilable will now poll if TimeLimitSeconds is 0 before waiting. There are a few implementers that don't use an event and sleep which is not ideal, but we at least now poll again after sleeping to avoid another round trip to know if the task is complete.

FAsyncTaskBase::WaitCompletionWithTimeout now polls for completion when given a time limit of 0 seconds. This simplifies use, and avoids unintended yielding.

Before PIE.Startup
FAsyncTask::SyncCompletion	Total Inclusive Time 5.25s  (40606 calls)

After PIE.Startup
FAsyncTask::SyncCompletion	Total Inclusive Time 195ms (39504 calls)

#jira UE-204061
#rb Francis.Hurteau, danny.couture

[CL 30922445 by kevin macaulayvacher in ue5-main branch]
2024-01-26 09:34:10 -05:00
..