refactor: optimize dom security schema lookups#69307
Conversation
Restructure the security schema map to index by property name instead of tag name, improving lookup efficiency.
| * Properties applying to all namespaces use ''. | ||
| */ | ||
| let _SECURITY_SCHEMA!: {[k: string]: SecurityContext}; | ||
| let _SECURITY_SCHEMA!: Record<string, Record<string, Record<string, SecurityContext>>>; |
There was a problem hiding this comment.
We might want to create a local type that expressing the security schema so that we can better document what it looks like a bit.
josephperrott
left a comment
There was a problem hiding this comment.
LGTM
Reviewed-for: fw-security
|
AGENT: This is a great optimization to avoid string allocations during security context lookups! I've reviewed the changes and noticed a couple of things to consider.
|
Restructure the security schema map to index by property name instead of tag name, improving lookup efficiency.
Reviwer note: use
hidewhite spacehttps://github.com/angular/angular/pull/69307/changes?w=1