Re: Server Scope / UDFs
> On Tuesday, Nov 19, 2002, at 12:05 US/Pacific, Dave Watts > wrote: >> Well, personally, I'm not much of a fan of the idea of >> loading UDFs >> into >> memory anyway - memory is good for storing data, but is >> wasted on code. > Well, functions are just data. The benefit is that you > don't have to > include the file that defines the function... I have a sneaky suspicion that is faster than ... or the cfscript equivalent... I've never load tested it, but i would expect that the CF processing engine, whether it's CF 5 pcode or CF MX Java has to take more time to read in and create the function than to assign a pointer to it. The pointer is after all only a byte or two of volatile memory lookup vs. the function definition which is invariably larger, plus time to actually parse and validate the code and make sure it's not missing a double-quote or a close-parenthesis somewhere, etc. Does anybody know for sure? Has anyone done any load testing to compare them? s. isaac dealey954-776-0046 new epoch http://www.turnkey.to lead architect, tapestry cms http://products.turnkey.to certified advanced coldfusion 5 developer http://www.macromedia.com/v1/handlers/index.cfm?ID=21816 ~| Archives: http://www.houseoffusion.com/cf_lists/index.cfm?forumid=4 Subscription: http://www.houseoffusion.com/cf_lists/index.cfm?method=subscribe&forumid=4 FAQ: http://www.thenetprofits.co.uk/coldfusion/faq Get the mailserver that powers this list at http://www.coolfusion.com
Re: Server Scope / UDFs
On Tuesday, Nov 19, 2002, at 12:05 US/Pacific, Dave Watts wrote: > Well, personally, I'm not much of a fan of the idea of loading UDFs > into > memory anyway - memory is good for storing data, but is wasted on code. Well, functions are just data. The benefit is that you don't have to include the file that defines the function... Sean A Corfield -- Director, Architecture Web Technology Group -- Macromedia, Inc. tel: (415) 252-2287 -- cell: (415) 717-8473 aim: seancorfield -- http://www.macromedia.com An Architect's View -- http://www.corfield.org/blog/ Introducing Macromedia Contribute. Web publishing for everyone. Learn more at http://www.macromedia.com/contribute ~| Archives: http://www.houseoffusion.com/cf_lists/index.cfm?forumid=4 Subscription: http://www.houseoffusion.com/cf_lists/index.cfm?method=subscribe&forumid=4 FAQ: http://www.thenetprofits.co.uk/coldfusion/faq Your ad could be here. Monies from ads go to support these lists and provide more resources for the community. http://www.fusionauthority.com/ads.cfm
RE: Server Scope / UDFs
> As easy as it would be to add isdefined("server.udfs")> to every application.cfm > on the server it would be far cooler to not have > to. :) Well, personally, I'm not much of a fan of the idea of loading UDFs into memory anyway - memory is good for storing data, but is wasted on code. However, if you really want to do this, there's no reason why you can't write a batch file to start CF, then request a CF file using an HTTP command-line client, like wget, to initialize your data. Dave Watts, CTO, Fig Leaf Software http://www.figleaf.com/ voice: (202) 797-5496 fax: (202) 797-5444 ~| Archives: http://www.houseoffusion.com/cf_lists/index.cfm?forumid=4 Subscription: http://www.houseoffusion.com/cf_lists/index.cfm?method=subscribe&forumid=4 FAQ: http://www.thenetprofits.co.uk/coldfusion/faq Signup for the Fusion Authority news alert and keep up with the latest news in ColdFusion and related topics. http://www.fusionauthority.com/signup.cfm
Re: Server Scope / UDFs
On Tuesday, November 19, 2002, at 11:51 AM, Raymond Camden wrote: > No. Unless you have all your code under an Application.cfm that does > it. > FYI, 'events' like this has been on the enhancement list for sometime. > :) Thanks for the responses Sean & Ray. I hope the "events" thing happens someday. As easy as it would be to add to every application.cfm on the server it would be far cooler to not have to. :) > Well, it is not recommends for CF5 because you would need to lock every > use of it. However in MX you wouldn't need to worry about it. Yeah, this is MX, so not as much of an issue. On Tuesday, November 19, 2002, at 01:58 PM, Sean A Corfield wrote: > Note that you cannot output HTML from methods of CFCs that are stored > in shared scopes (but, hey, you wouldn't be outputting HTML from CFCs > anyway, would you?). Absolutely not! :) > Nope, you need to scope them. Sure, you could create a 'local' alias > via Application.cfm () > but that won't be available inside custom tags for example. Right. I was more looking for a "hack" ala putting custom tags into the \wwwroot\WEB-INF\cftags directory so they be called like native tags. Oh well. Only a little additional typing. ~| Archives: http://www.houseoffusion.com/cf_lists/index.cfm?forumid=4 Subscription: http://www.houseoffusion.com/cf_lists/index.cfm?method=subscribe&forumid=4 FAQ: http://www.thenetprofits.co.uk/coldfusion/faq This list and all House of Fusion resources hosted by CFHosting.com. The place for dependable ColdFusion Hosting.
Re: Server Scope / UDFs
On Tuesday, Nov 19, 2002, at 08:35 US/Pacific, Sean Daniels wrote: > Is there a way to force CFMX to load some vars into server scope when > the service is started? As Raymond says, put code in Application.cfm to load it once. > Also, has anyone had any negative reaction to loading a CFC into server > scope? Note that you cannot output HTML from methods of CFCs that are stored in shared scopes (but, hey, you wouldn't be outputting HTML from CFCs anyway, would you?). > Lastly, if someone has figured out a way to load UDFs in such a way > that they behave like native functions, I would love to hear about it. Nope, you need to scope them. Sure, you could create a 'local' alias via Application.cfm () but that won't be available inside custom tags for example. Sean A Corfield -- Director, Architecture Web Technology Group -- Macromedia, Inc. tel: (415) 252-2287 -- cell: (415) 717-8473 aim: seancorfield -- http://www.macromedia.com An Architect's View -- http://www.corfield.org/blog/ Introducing Macromedia Contribute. Web publishing for everyone. Learn more at http://www.macromedia.com/contribute ~| Archives: http://www.houseoffusion.com/cf_lists/index.cfm?forumid=4 Subscription: http://www.houseoffusion.com/cf_lists/index.cfm?method=subscribe&forumid=4 FAQ: http://www.thenetprofits.co.uk/coldfusion/faq Structure your ColdFusion code with Fusebox. Get the official book at http://www.fusionauthority.com/bkinfo.cfm
RE: Server Scope / UDFs
> Is there a way to force CFMX to load some vars into server scope when > the service is started? No. Unless you have all your code under an Application.cfm that does it. FYI, 'events' like this has been on the enhancement list for sometime. :) > Also, has anyone had any negative reaction to loading a CFC > into server > scope? I basically have a library of UDFs I want globally available > that I thought I would throw into a CFC and load into server scope. > This way the UDF's would be available to all code, including > typically > blackboxed code like other CFCs and Custom tags, etc. Well, it is not recommends for CF5 because you would need to lock every use of it. However in MX you wouldn't need to worry about it. === Raymond Camden, ColdFusion Jedi Master for Hire Email: [EMAIL PROTECTED] WWW : www.camdenfamily.com/morpheus Yahoo IM : morpheus "My ally is the Force, and a powerful ally it is." - Yoda ~| Archives: http://www.houseoffusion.com/cf_lists/index.cfm?forumid=4 Subscription: http://www.houseoffusion.com/cf_lists/index.cfm?method=subscribe&forumid=4 FAQ: http://www.thenetprofits.co.uk/coldfusion/faq Signup for the Fusion Authority news alert and keep up with the latest news in ColdFusion and related topics. http://www.fusionauthority.com/signup.cfm