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
feat: Normalise selector fields into a pre-parsed format to speed up lookups
Previously, an operator like {"x.y": 1} in a selector would require
"x.y" to be parsed using `mango_util:parse_field` into the form ["x",
"y"] first, before the path could be traversed. This happens every time
the selector is evaluated.
If we instead parse the field name during normalisation, then we can
speed up selector evaluation considerably. This does mean that the
normalised form is no longer a valid ejson form; instead of
{[{<<"x.y">>, 1}]}
it is:
{[{[<<"x">>, <<"y">>], 1}]}
There are a few places where a normalised selector needs to be turned
back into serialised JSON and written to disk or to an HTTP response, so
we have had to insert logic for turning these array keys back into
strings for such situations.
0 commit comments