Issues

Select view

Select search mode

 
22 of 22

String parsing significantly slower in Lucee than in OpenBD

Fixed

Description

As per described in Lucee developer forums, we found out after switching to Lucee that some of our existing functions that did tons of Replace() and other string functions were extremely slow compared to their execution on OpenBD (even with slower hardware).

This isn't exactly a measurable difference in isolated case, but the function in case was repeated several times in some templates - and those templates were the only ones throwing timeouts to our error logs. Once we replaced the custom function (a customized datetimeformat function replacement) with system's own such function, all the timeouts we have had over the past 14 months, disappeared.

The function had just lots of replaces, nothing more complicated than that and the string it took in, was a short one, basically a date mask:

Short clip from the function:

Now, I suspect that by switching from Lucee's internal Replace() to Java's replace functions on other site areas might improve performance there, too..

Suggest you look into this, even tho it might seem insignificant.

Environment

CentOS / Tomcat

Details

Assignee

Reporter

Priority

New Issue warning screen

Before you create a new Issue, please post to the mailing list first https://dev.lucee.org

Once the issue has been verified, one of the Lucee team will ask you to file an issue

Affects versions

Created 21 March 2019 at 11:02
Updated 21 May 2024 at 19:36
Resolved 21 May 2024 at 19:36

Activity

Show:

Michael Offner21 March 2019 at 17:48

we do not use the replace function coming from java String, because they support regex and are because of that incompatible and slower. we will do some testing to find out what makes them slow, actually we have spend a lot of time to make this function as fast as possible

Zac Spitzer21 March 2019 at 15:58

there's an ongoing discussion about on the mailing list

Zac Spitzer21 March 2019 at 11:39

Flag notifications