> Thanks for responding Michael. I'm confused though: > > Michael Dinowitz wrote: > > You can dump out the scope to get a relative idea of its content. > How does dumping the scope help me get a relative idea of the number > of > bytes? Am I supposed to count the number of characters in each string? relatively. :) But seriously, look at what type of container is holding the data and estimate from there. If its a string then assume that the length plus a little overhead is the size. If it's a complex variable then add more overhead per item and depth. Your getting a general idea with this method, not anywhere near an exact amount. Ballpark figures.
> What about numeric data? Should I count it as I count a string (since > CF > is typeless) or does a number take up more bytes the bigger it gets? To be safe I'd count it as a string. > > If a component is stored in a scope, you need to also take into > account inheritance as well as it's internally stored variables as > well as method overhead. > How do I go about taking these things into account? Estimate. I usually assume a component is 'worth' twice its filesize as a standard plus whatever is stored in it if cached. This is even more of a relative figure as the actual memory size is determined by the complexity of the compiled code. My estimation is based on the standard tags being used. NONE of this is exact or should be taken as exact. What you get is a good ballpark as to what is stored in the application scope (which doesn't really matter much) and what is stored per user session (which can be critical). ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~| ColdFusion MX7 by AdobeĀ® Dyncamically transform webcontent into Adobe PDF with new ColdFusion MX7. Free Trial. http://www.adobe.com/products/coldfusion?sdid=RVJV Archive: http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:279286 Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4

