File tree Expand file tree Collapse file tree 1 file changed +11
-0
lines changed Expand file tree Collapse file tree 1 file changed +11
-0
lines changed Original file line number Diff line number Diff line change @@ -182,6 +182,17 @@ macro(_sbeParseValue prefix)
182
182
set (json_inValue no )
183
183
184
184
while (${json_index} LESS ${json_jsonLen} )
185
+ # fast path for copying strings
186
+ if (json_inValue )
187
+ # attempt to gobble up to 128 bytes of string
188
+ string (SUBSTRING "${json_string} " ${json_index} 128 try_gobble )
189
+ # consume a piece of string we can just straight copy before encountering \ or "
190
+ string (REGEX MATCH "^[^\"\\\\ ]+" simple_copy "${try_gobble} " )
191
+ string (CONCAT json_value "${json_value} " "${simple_copy} " )
192
+ string (LENGTH "${simple_copy} " copy_length )
193
+ math (EXPR json_index "${json_index} + ${copy_length} " )
194
+ endif ()
195
+
185
196
string (SUBSTRING "${json_string} " ${json_index} 1 json_char )
186
197
187
198
# check if json_value ends, it is ended by "
You can’t perform that action at this time.
0 commit comments