Daemon et al; I'm attaching some optimized code for Friendly URL's. Due to the size or our site we've discovered that FU.cfc needed some speed tweaks to work efficiently with large sites. To give you an idea of what kind of scale I'm talking about, our FU text file is at 3947 lines and growing. In draft mode with FU turned on the site seriously drags arse! Anyhow here's what I've done:
1. Moved the FU mappings into "application.config.FUSettings.mappings" The old way loaded the mappings into the request scope with each call to getFU(). I don't see any reason for this? So now getFU() works out of the application scope. As changes are made to the FU text file, createAll(), setFU(), deleteFU() will keep the application scope updated. 2. getFU() and deleteFU() were looping over the mappings structure looking for a match. deleteFU() would actually loop over the mappings once for each domain. Instead of looping over the mappings, getFU() now uses structFindValue() and deleteFU() now uses structFindKey(). To gauge the efficiency of the code I created static list of 741 random dmNavigation objectId from my Db. I ran this list against application.factory.oFU.getFU() as I made changes. Before the changes it took 162778ms to run the list. After the changes were complete it took only 2969ms to run the same list. 3. I've also updated farcry_core/packages/types/_dmnavigation/edit.cfm (attached) so it's a little more friendly with larges sites during the setFU() portion of the edit. I've changed the message just a bit and added a visual feedback to the user via <cfflush> so they don't lose patience and click off the edit page. Daemon, if you'd commit these changes to the core for me you'd be my hero's! Thanks gents, ~Tom Att: farcry_core/packages/types/_dmnavigation/edit.cfm Farcry_core/packages/farcry/fu.cfc
fu.cfc
Description: Binary data
edit.cfm
Description: Binary data
--- You are currently subscribed to farcry-dev as: [EMAIL PROTECTED] To unsubscribe send a blank email to [EMAIL PROTECTED]
