Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

array: make DimensionMismatch lazy-string friendly #50079

Merged
merged 1 commit into from
Jun 7, 2023
Merged

Conversation

aviatesk
Copy link
Member

@aviatesk aviatesk commented Jun 6, 2023

At the moment, the msg field of DimensionMismatch is typed as String. This means lazy strings passed to DimensionMismatch are instantly instantiated, defeating the whole purpose of using LazyString.

This commit tweaks the field type to AbstractString. This way, lazy strings get instantiated during the exception handling later on.

At the moment, the `msg` field of `DimensionMismatch` is typed as
`String`. This means lazy strings passed to `DimensionMismatch` are
instantly instantiated, defeating the whole purpose of using `LazyString`.

This commit tweaks the field type to `AbstractString`. This way,
lazy strings get instantiated during the exception handling later on.
@aviatesk aviatesk requested a review from JeffBezanson June 6, 2023 10:19
aviatesk added a commit that referenced this pull request Jun 6, 2023
With the same motivation as #50079, this commit is
defining the `msg` field of `MissingException` as an `AbstractString`
type. By utilizing `LazyString`, it aims to improve the effects of
various operations associated with `missing`.
@oscardssmith oscardssmith added the performance Must go faster label Jun 6, 2023
@aviatesk aviatesk merged commit 0b47546 into master Jun 7, 2023
@aviatesk aviatesk deleted the avi/lazystring branch June 7, 2023 01:04
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
performance Must go faster
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants