REPLACE STRING is faster

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.

How?

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

Vanessa Talbot
• Product Owner •Vanessa Talbot joined 4D Program team in June, 2014. As a Product Owner, she is in charge of writing the user stories then translating it to functional specifications. Her role is also to make sure that the feature implementation delivered is meeting the customer need.Since her arrival, she has worked to define key features in 4D. She has worked on most of preemptive multi-threading new features and also on a very complex subject: the new architecture for engined application. Vanessa has a degree from Telecom Saint-Etienne. She began her career at the Criminal Research Institute as a developer for the audiovisual department. She has also worked in media and medical fields as expert in technical support, production as well as documenting new features.