Rules timeout on 7.x

Hi all
I have this one particular site that takes an age to render if you turn on Rules. In some cases it can timeout. Otherwise it’s a snappy site. This site probably started out as 6.x and has had a few updates (now at 7.2.10) along with physical server changes. Cf9 and now lucee 4.5. both on Linux. Other sites running on the same instance don’t have this issue. It has a few plugins but nothing especially out of the ordinary.
I’ve cleared out tables like farlog and archive etc. Ive compared farcryconstructor setups. It also not a large site. Content items in the sub 1000 range.
I’ve been scratching my head for over year on this. It’s been like this since the update to 7.x

Anyone had this problem? Or can offer any suggestions.

Phil

Actually, It looks like the postprocess that’s causing it. Remove the post process tag off the website skin, restart the app and it’s quick as. I have extended this on this site so I’ll have a play and let you know what I find.

Just tested in on another site. Same issue with the postprocess.
If I remove the decorator from the webskin
<!--- postprocess: imageGallery;youtube(width=720,height=405) --->
and replace it in the body with this…
#application.fc.lib.postprocess.apply(stObj.body,"imageGallery;youtube(width=720,height=405);vimeo")#
the rendering time with Rules turned on goes from 29sec to 0.5sec.

I did extend the postprocess.cfc to include that imageGallery so I’ll do some tests later with taking that out of the mix. That still wouldn’t explain how removing the decorator make the difference in render times.

Postprocess uses regex, and the size of the text being processed has a big
impact on the performance. Applying it to just stObj.body is a good way to
improve that. Regarding turning rules on - perhaps that adds a lot of HTML
to the page that blows out the processing time.

yeah I think using the body is the way to go. On this particular homepage there is no body at all, it’s all containers.

A quick test on my local pre prod machine with page rendering time:
as a decorator the postprocess process a string with a length of:
no rules - HTML length: 22977 (800ms)
with rules on - HTML length : 133799 (4000ms)
Just applied to body:
no rules - HTML length: 0 (400ms)
with rules - HTML length: 0 (500ms)

My pre prod machine handles the postprocess much better than the prod machine which takes up to 30 - 40 secs with rules on.