PR# 19148 Compiling large verbatim string is slow

Problem Report Summary
Submitter: manus_eiffel
Category: Compiler
Priority: Low
Date: 2015/10/26
Class: Bug
Severity: Non-critical
Number: 19148
Release: 15.11
Confidential: No
Status: Open
Environment: Windows 10
Synopsis: Compiling large verbatim string is slow

When compiling a file containing a lot of verbatim strings, such as the files generated by the eiffel_image_embedder tool, the compiler is inefficient at left aligning the string, removing one character at a time, causing large internal copies of the whole string. I think that for strings larger than a certain ratio, we should be the cost of memory allocation of a destination buffer and create the left aligned string in that new buffer, causing just a O(n) cost on copy and the cost of the allocation.
To Reproduce

Problem Report Interactions