Skip to content

Speed up checking whether fields are markdown fields or not

Nick Thomas requested to merge add-field-data-key into master

What does this MR do?

Extracted from !63040 (merged)

Gitlab::MarkdownCache::FieldData wraps a cache, and we consult cache key membership in a few places. Currently, we do that by effectively calling @data.keys.include?

Calling @data.key? is a tiny bit more efficient, and reads more cleanly in the places it's used.

No changelog since I don't think this is going to be a noticeable performance change.

Screenshots (strongly suggested)

Does this MR meet the acceptance criteria?

Conformity

Availability and Testing

Edited by Nick Thomas

Merge request reports

Loading