Use MemoryStream for performance
This commit is contained in:
parent
be2da029c6
commit
49f4caddfb
3
wp2git.d
3
wp2git.d
|
@ -21,7 +21,8 @@ int main(string[] args)
|
||||||
throw new Exception("curl error");
|
throw new Exception("curl error");
|
||||||
|
|
||||||
fwritefln(stderr, "Loading history...");
|
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;
|
string data;
|
||||||
foreach (child; xml[0]["page"])
|
foreach (child; xml[0]["page"])
|
||||||
|
|
Loading…
Reference in New Issue