Skip to content

Revisit CachingByArgumentsLengthPartialFormatter implementation #4805

@sbrannen

Description

@sbrannen

Overview

Now that we cache {arguments} patterns globally (see #4804), we should revisit the need for and/or implementation of CachingByArgumentsLengthPartialFormatter in ParameterizedInvocationNameFormatter.

At a glance, it appears that CachingByArgumentsLengthPartialFormatter is more like a memoizing factory rather than a cache, somewhat analogous to NamespacedHierarchicalStore.MemoizingSupplier.

In other words, it appears that the size of the cache in CachingByArgumentsLengthPartialFormatter is only ever 0 or 1. If that's the case, we probably do not need to store the result in a ConcurrentHashMap.

Related Work

Metadata

Metadata

Type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions