Repeated Perl concat-assignment (for example, building a parser token one character at a time with .=) currently risks copying the complete Java String prefix on every append. This produces quadratic time and can turn ordinary multi-megabyte inputs into apparent hangs.
The immediate Selenium::Remote::Driver regression provides a concrete example: JSON::PP decodes a 3.4 MB mocked response with an escaped body using repeated scalar appends.
Investigate a runtime-level amortized representation for ordinary growing string scalars, with materialization at observable boundaries. Preserve Perl behavior for aliases, UTF-8 versus byte-string flags, tied and overloaded scalars, scalar magic/watchers, serialization, and both JVM and interpreter backends.
Acceptance criteria:
- Repeated .= growth is linear or amortized-linear for plain strings.
- Existing scalar semantics remain unchanged at read, assignment, and interop boundaries.
- Include focused performance/regression coverage and benchmarks for parser-style large inputs.
Repeated Perl concat-assignment (for example, building a parser token one character at a time with .=) currently risks copying the complete Java String prefix on every append. This produces quadratic time and can turn ordinary multi-megabyte inputs into apparent hangs.
The immediate Selenium::Remote::Driver regression provides a concrete example: JSON::PP decodes a 3.4 MB mocked response with an escaped body using repeated scalar appends.
Investigate a runtime-level amortized representation for ordinary growing string scalars, with materialization at observable boundaries. Preserve Perl behavior for aliases, UTF-8 versus byte-string flags, tied and overloaded scalars, scalar magic/watchers, serialization, and both JVM and interpreter backends.
Acceptance criteria: