-
Notifications
You must be signed in to change notification settings - Fork 0
Open
Labels
improvementImprovement of an existing featureImprovement of an existing feature
Description
Improvement: avoid building RotatedTextWithTerminator and have VirtuallyRotatedTextWithTerminator access directly to the underlying TextWithTerminator.
Currently the construction of a VirtuallyRotatedTextWithTerminator instance requires wrapping the underlying TextWithTerminator into a RotatedTextWithTerminator: c.p. the following excerpt from
| new(new(text, text.Terminator, false), rotation); |
public static VirtuallyRotatedTextWithTerminator ToVirtuallyRotated(this TextWithTerminator text, int rotation) =>
new(new(text, text.Terminator, false), rotation);Why: on large input (strings of hundreds of MB), a RotatedTextWithTerminator instance has to be built for each "virtual rotation" of the input, i.e. as many instances of this object are created as chars in the input. This leads to a high memory usage, and possibly to OutOfMemoryException.
Metadata
Metadata
Assignees
Labels
improvementImprovement of an existing featureImprovement of an existing feature