Skip to content
Snippets Groups Projects
Commit bed13c1c authored by MaZiFAU's avatar MaZiFAU
Browse files

Performance;

Performance:
+discard out of date Dynamic Scroll Requests
parent 85082b1e
No related branches found
No related tags found
No related merge requests found
......@@ -41,6 +41,7 @@ public static ScrollDetails Instance
public bool AutomaticHintGenerationActive = true;
private bool DynamicScrollDone = true;
private bool DynamicScrollInQue = false;
void Awake()
{
......@@ -152,7 +153,7 @@ public void MagicButtonTrigger()
IEnumerator _MagicButton()
{
while (!DynamicScrollDone)
while (!DynamicScrollDone || DynamicScrollInQue)
yield return null; // Wait for last assignment
DynamicScrollDone = false;
......@@ -190,8 +191,13 @@ public void NewAssignmentTrigger()
IEnumerator _NewAssignment()
{
if(DynamicScrollInQue)
yield break; // only need next in que to finish
DynamicScrollInQue = true;
while (!DynamicScrollDone)
yield return null; // if we dont wait => server will crash
DynamicScrollInQue = false;
DynamicScrollDone = false;
yield return SendView("/scroll/dynamic");
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment