Show More
Commit Description:
Add timers for Simulation and various engines...
Commit Description:
Add timers for Simulation and various engines
Starting to add additional timers for different stages of the process of
updating in order to get more insight into what is slowing it down.
The update takes 9ms, which is much longer than it used to.
Engine-specific timers are coming later.
References:
File last commit:
Show/Diff file:
Action:
scripts/Shared.csx
42 lines | 925 B | text/plain | TextLexer
42 lines | 925 B | text/plain | TextLexer
r442 | #r "YamlDotNet.dll" | |||
using YamlDotNet.Serialization; | ||||
public enum OrganizationType | ||||
{ | ||||
Unspecified, | ||||
Family, | ||||
LargeCorporation, | ||||
Cooperative | ||||
} | ||||
public struct ImageMetadata | ||||
{ | ||||
public string Description; | ||||
public string Subject; | ||||
public string Source; | ||||
public string URL; | ||||
public string Filename; | ||||
public OrganizationType[] OrganizationType; | ||||
public int Subjects; | ||||
} | ||||
public struct NewsItem | ||||
{ | ||||
public string hed; | ||||
public string contents; | ||||
public string source; | ||||
public Dictionary<string, string> variables; | ||||
} | ||||
public List<ImageMetadata> LoadImageMeta() | ||||
{ | ||||
var sr = new StreamReader(@"isometric-park-fna/Content/portraits.yaml"); | ||||
var input = new StringReader(sr.ReadToEnd()); | ||||
var deserializer = new DeserializerBuilder() | ||||
.Build(); | ||||
return deserializer.Deserialize<List<ImageMetadata>>(input); | ||||
} | ||||