性能优化与检测, 防止假死机
This commit is contained in:
@@ -251,7 +251,6 @@ namespace Demo
|
||||
|
||||
public IEnumerator ParseFromScriptFile2Expr(ToolFile file)
|
||||
{
|
||||
float parseStartTime = Time.realtimeSinceStartup;
|
||||
IsParseScript2Expr = true;
|
||||
try
|
||||
{
|
||||
@@ -342,15 +341,11 @@ namespace Demo
|
||||
finally
|
||||
{
|
||||
IsParseScript2Expr = false;
|
||||
float parseEndTime = Time.realtimeSinceStartup;
|
||||
float parseElapsed = (parseEndTime - parseStartTime) * 1000f;
|
||||
Debug.Log($"[{nameof(ParseFromScriptFile2Expr)}] {file.GetFullPath()} 耗时: {parseElapsed:F2} ms", this);
|
||||
}
|
||||
}
|
||||
|
||||
public IEnumerator ParseScript2Expr(string script)
|
||||
{
|
||||
float parseStartTime = Time.realtimeSinceStartup;
|
||||
IsParseScript2Expr = true;
|
||||
try
|
||||
{
|
||||
@@ -364,9 +359,6 @@ namespace Demo
|
||||
finally
|
||||
{
|
||||
IsParseScript2Expr = false;
|
||||
float parseEndTime = Time.realtimeSinceStartup;
|
||||
float parseElapsed = (parseEndTime - parseStartTime) * 1000f;
|
||||
Debug.Log($"[{nameof(ParseScript2Expr)}] {this.ScriptName} 耗时: {parseElapsed:F2} ms", this);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user