Use MemoryStream for performance

This commit is contained in:
Vladimir Panteleev 2010-06-16 00:57:25 +03:00
parent be2da029c6
commit 49f4caddfb
1 changed files with 2 additions and 1 deletions

View File

@ -21,7 +21,8 @@ int main(string[] args)
throw new Exception("curl error");
fwritefln(stderr, "Loading history...");
auto xml = new XmlDocument(new File("history.xml"));
string xmldata = cast(string) read("history.xml");
auto xml = new XmlDocument(new MemoryStream(xmldata));
string data;
foreach (child; xml[0]["page"])