I had a problem with farCry chewing up all the CPU resources
(requiring a cfmx app service bounce) when I applied my rule (based on
ruleRandomFact) to a container and the rule did not return any objects
to display.
Admittedly, I did make a couple of minor changes (added a wieghting to
the object for sorting) but made the following changes that I beleive
would improve performance, with the bonus side affect of fixing the
cpu usage problem. Oh, by the way - to get farcry back up and running,
I had to remove the rule object from container_aRules table in the
database.
line 295: o = createObject("component", application.types.dmFacts.typePath);
moved this line out of the loop
line:259: put in a check to see if there are and records returned
<cfif qGetFacts.recordcount>
which wraps everthing upto displaying the facts (no pint tying to
randomly pick the objects if there arent any) with an else after that
outputs a non-breaking space - could also be a message if you wanted.
I also removed the paragraph tage from the rule disply loop. Think
this may have already been discuess in this forum previously.
---
You are currently subscribed to farcry-dev as: [EMAIL PROTECTED]
To unsubscribe send a blank email to [EMAIL PROTECTED]
Aussie Macromedia Developers: http://lists.daemon.com.au/