Skip to content

Commit

Permalink
CDRIVER-1370 note about a failed optimization
Browse files Browse the repository at this point in the history
  • Loading branch information
ajdavis committed Dec 7, 2016
1 parent 4559af8 commit cb3be07
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/bson/bson-json.c
Original file line number Diff line number Diff line change
Expand Up @@ -1109,6 +1109,8 @@ _pop_callback (jsonsl_t json,
BSON_ASSERT (obj_text[0] == '"');

/* remove start/end quotes, replace backslash-escapes, null-terminate */
/* you'd think it would be faster to check if state->nescapes > 0 first,
* but tests show no improvement */
if (!_bson_json_unescape (reader, state, obj_text + 1, len - 1)) {
/* reader->error is set */
jsonsl_stop (json);
Expand Down

0 comments on commit cb3be07

Please sign in to comment.