Scott, [Snip] Andrew it all sounds like your pinning your hopes on Singletons vs refactoring / revising whats stored in session scope. Once you narrow that down, how you store the excess is another process unto itself. ( I am assuming you haven't done the first part.. if you have, accept my apologies).
Actually no I haven't thought of anything at this stage, I am looking at alternatives yes. But was interested in the singleton method to replace some Custom Tags that are shared across applications, to minimise execution time I was looking at storing these into the Application scope, hence the reason behind Singleton as I thought it would have to be approached in this manner somehow to share across the application. I am looking at an approach similar to Mach-II, but it needs to fit within the current design framework and CFC's was being considered to leverage of the super methods etc and was thinking that it might be cheaper execution time and memory with a cfc compared to custom tag. As to how I am going to approach this is still in the air, but I thought OO would be a better approach to try to cut down the code for better reuse and that is the main objective at the moment, as I have 3 websites that share modules and maintaining them at the moment is a total nightmare under the way it has been currently designed. So although at the moment that have 3 separate databases, but share nearly 98% code. As well as many sections of the module share code across modules. So you can maybe guess where I am headed here. Regards Andrew Scott Technical Consultant NuSphere Pty Ltd Level 2/33 Bank Street South Melbourne, Victoria, 3205 Phone: 03 9686 0485 - Fax: 03 9699 7976 -----Original Message----- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Scott Barnes Sent: Tuesday, 1 March 2005 2:57 PM To: CFAussie Mailing List Subject: [cfaussie] Re: CFCs calling CFCs On Tue, 1 Mar 2005 13:00:03 +1100, Andrew Scott <[EMAIL PROTECTED]> wrote: > Mark, > [snip] > > We have applications that are chewing through too much memory, and I > need to reduce this quickly and find a solution that will work. > > Here is the problem I have 80 users on this system, and every time > they log in and logout they are creating another session, multiply the > number of users by 500k by 100 logins an it starts adding up. > > My solution is to start reducing things that don't need to be held in > memory, but I would like to know how much memory certain variables are > taking up if this is at all possible. Cool..hmm.. i guess this is where you need to think about whats needed in memory, for my mind if any data falls into these two categories, then yes they belong in session scope - otherwise get em out - imho. - Temporary data (ie scarts for basic example) - Common Data (used on nearly every page in/out) I say this as its a fine balance between saving "expensive calls" to a Database / XML file then it is to hold stuff in memory that may be more expensive (simply due to volume). Also keep basic information, a classic basic example would be a simple shopping cart: Now you add an item to your basket and there is various metadata that you need to keep track of about that item mostly snapshot of the items important information. Most would simply lock that up in a big ol Struct and unpack it it at checkout.. but in reality once you add it to a cart? all you really need is some "summary" level variables and a "key" that refers to the extended information. This extended information could be stored in: - XML file (probably not a good idea as it means HDD annoyances) - Database (typically not that bad.. but could also be expensive) - Other means ( you could have a compression system in place on the data or crap like that maybe). But i think that would get into collections vs entities argument(s) hehehehehe... > I don't like using session either, as it is very non cluster aware > unless using sticky sessions. But that defeats the purpose of off > loading in a cluster in my eyes. But that is another story. > > All I am asking, is there a way to see how much memory a variable is > taking up. Nothing but good ol getTicker() heheheh... > And I am already aware of the SessionEnd and SessionStart of CF7.0, > but its not what I am asking. DONT GO THERE.. lol - I'd even say that as until I get CF7.0 i too have to pretend those damn purty events don't exist... Andrew it all sounds like your pinning your hopes on Singletons vs refactoring / revising whats stored in session scope. Once you narrow that down, how you store the excess is another process unto itself. ( I am assuming you haven't done the first part.. if you have, accept my apologies). -- Regards, Scott Barnes http://www.mossyblog.com --- You are currently subscribed to cfaussie as: [EMAIL PROTECTED] To unsubscribe send a blank email to [EMAIL PROTECTED] Aussie Macromedia Developers: http://lists.daemon.com.au/ --- You are currently subscribed to cfaussie as: [email protected] To unsubscribe send a blank email to [EMAIL PROTECTED] Aussie Macromedia Developers: http://lists.daemon.com.au/
