You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Bug#25418534: JSON_EXTRACT USING WILDCARDS TAKES FOREVER
Patch #7:
Accessing the JSON path legs requires going through virtual accessor
functions, due to the different storage of path legs in Json_path and
Json_path_clone. The former stores the path legs in an array of
Json_path_leg objects, whereas the latter stores them in an array of
pointers.
This patch makes both of the classes store the path legs in an array
of pointers. Json_path, which is the owner of the path leg instances,
additionally has a MEM_ROOT in which the Json_path_leg objects live.
Now that the path legs are stored the same way in the two classes, it
is possible to iterate over them without using virtual function calls.
Iterators are provided through begin() and end() to facilitate
iteration using standard mechanisms. The seek functions
find_child_doms() and seek_no_dup_elimination() are changed to take
begin and end iterators for iterating over the paths.
Microbenchmarks (64-bit, Intel Core i7-4770 3.4 GHz, GCC 6.3):
BM_JsonDomSearchEllipsis 17634 [+21.0%]
BM_JsonDomSearchEllipsis_OnlyOne 123 [ +5.7%]
BM_JsonDomSearchKey 116 [ 0.0%]
BM_JsonBinarySearchEllipsis 64065 [+10.8%]
BM_JsonBinarySearchEllipsis_OnlyOne 89 [+14.6%]
BM_JsonBinarySearchKey 77 [ +7.8%]
Change-Id: I864d55a2f07d5f4bda330fee03cdcf0bb0d4f3e6
0 commit comments