Currently, addStrippedPropertyPaths() recursively enumerates all subsets of [key] segments in a property path, producing 2^n − 1 stripped path variants for a path with n bracket pairs, and both callers (findCustomEditor() and guessPropertyTypeFromEditors()) build the full list eagerly before iterating it.
Since property paths with more than a few bracket segments likely do not exist in real-life applications, we can probably revise addStrippedPropertyPaths() so that it short-circuits when the bracket-segment count exceeds a small limit, such as 8, thereby retaining existing behavior for all realistic inputs while rejecting nesting depths greater than the limit.
NOTE: This issue is assigned and therefore not suitable for community contributions.
Currently,
addStrippedPropertyPaths()recursively enumerates all subsets of[key]segments in a property path, producing2^n − 1stripped path variants for a path withnbracket pairs, and both callers (findCustomEditor()andguessPropertyTypeFromEditors()) build the full list eagerly before iterating it.Since property paths with more than a few bracket segments likely do not exist in real-life applications, we can probably revise
addStrippedPropertyPaths()so that it short-circuits when the bracket-segment count exceeds a small limit, such as 8, thereby retaining existing behavior for all realistic inputs while rejecting nesting depths greater than the limit.NOTE: This issue is assigned and therefore not suitable for community contributions.