In 4D v15 R3, the algorithm of the REPLACE STRING command has been enhanced to make replacements on large amounts of data faster. In our tests replacing 32,000 occurrences, the new algorithm makes the command an average of 4000 times faster than the old one.
The REPLACE STRING command allows you to make replacements based on code characters or based on characters. By default, replacements are based on character, and when the « * » parameter is passed, replacements are based on character code.
Based on character
With our tests, the command takes 331 sec (on average) to replace 32,000 occurrences with v15, and with v15 R3, it only takes 0.062 sec (on average). Around 5300 times faster.
Based on character code
With our tests, the command takes 334 sec (on average) to replace 32,000 occurrences with v15, and with v15 R3, it only takes 0.14 sec (on average). Around 2300 times faster.
For more details, please take a look at the 4D v15 R3 Upgrade manual