-Rewrote LINQ to JSON internals to use lists and dictionaries rather than a linked list

-Moved JPropertyDescriptor to Newtonsoft.Json.Linq namespace
This commit is contained in:
JamesNK
2011-05-28 00:46:38 +00:00
parent cc44f53c1a
commit b3cc3e88ac
19 changed files with 337 additions and 337 deletions
@@ -121,6 +121,31 @@ namespace Newtonsoft.Json.Tests
return result;
}
[Test]
public void BuildJObject()
{
JObject o = new JObject();
for (int i = 0; i < 200; i++)
{
o[i.ToString()] = i;
}
string jsonText = o.ToString();
// this is extremely slow with 5000 interations
int interations = 100;
TimeOperation(() =>
{
JObject oo = null;
for (int i = 0; i < interations; i++)
{
oo = JObject.Parse(jsonText);
}
return oo;
}, "JObject");
}
private void SerializeSize(object value)
{
// this is extremely slow with 5000 interations