dlang-community / std_data_json

Phobos candidate JSON implementation.
25 stars 13 forks source link

Eager/lazy ranges? #10

Open s-ludwig opened 9 years ago

s-ludwig commented 9 years ago

Currently, JSONLexerRange eagerly skips whitespace for performance reasons, but everything else is evaluated lazily. The problem with eager WS skipping is that it makes the lexer unusable in a request/response scenario where a requests consists of a single JSONValue. Skipping the whitespace at the end would block on the connection until the next request arrives, which may never happen if the previous one never gets processed.

This should either be made configurable, or the fully lazy version needs to be brought up to the same speed as the eager version.

Panke commented 3 years ago

Is this still a problem?