I've been working on creating a prototype restful web service
using vibe.d and it runs very fast on my tests except for when I
pass in documents that have a larger number of nested levels.
With those, I see a very noticeable pause, about 1 second, before
I get a response back with curl. Below is a sample file that
describes the structure I'm using. It's only when block5 exists
that the issue occurs. I have other combinations that work fine
and I even though it was my code, but after commenting it out, I
still saw the pause.
My current thought is that it has something to do with parsing
the JSON, but I could be wrong. Any thoughts on what this could
be? I'm not on the best environment, but I didn't have any other
processes running at the same time when I run this, so I'm very
certain that it's not an environment issue. My only other
thought is that there's an issue with Curl. However, I made a
different test case that didn't have block5 in it, but had
multiple entries in the block3 array, so it is similar in size,
perhaps larger, than the ones I'm having issues with and it works
perfectly.
{
"block1":
{
"val1": "value",
"val2": "value",
"val3": "value",
"val4": ["A", "B"],
"block2":
{
"arr1":
[
{
"val5": "C",
"val6": ["D"]
}
]
}
},
"block3":
[
{
"val7": "value",
"block4":
{
"val8": 0,
"val9": "E",
"val10": ["F"],
"val11": ["G"],
"block5":
{
"arr2":
[
{
"val12": "H",
"val13": ["I", "J", "K"]
}
]
}
}
}
]
}