Re: To object or not to object

2006-10-18 Thread Nathan Strutz
Charles,

I have a couple things to point out that may help you...

1: Your CMS - why not do the processing every time the page is changed and
save a static file, like HTML or a semi-dynamic cfm page? That should keep
the processing down a lot. You may be doing that, I couldn't really tell
from what you said.

2: In my opinion, anything that keeps things simpler, or at least looking
simpler, is better. Caching your #foo# object is a good idea, but why put
that logic on your cfm templates? What if you generate foo in the pg.method(),
and have it return it every time. cache it in the CFC's variables scope, or
request scope.

3: I'm not sure I understand your CMS's plugins system, so maybe I'm not
qualified to say. I'm thinking that pre-generating as much as possible is
the best way to go. I can't really see from what you've given us.

4: Be careful of how much you store in the application scope. If you're
filling a GB, you're getting up there. If you expect exponential growth and
will soon be pushing 2GB, it's time to rethink your strategy.

5: CF on windows with 32-bit processors can be pushed upwards of 2GB, but I
wouldn't recommend going over 1.8GB.

-- 
nathan strutz
http://www.dopefly.com/


On 10/17/06, Charles Sheehan-Miles <[EMAIL PROTECTED]> wrote:
>
> Hi all,
>
> I¹m brand new to CF7 and persistent CFCs and the like, and I¹m seeking
> advice.  Here¹s the lowdown:
>
> I have a content management application that has about the thousand
> templates, all badly written spaghetti code, etc., which I¹m in the
> process
> of cleaning up.  I¹ve put together a framework that seems to work well ‹
> performance is way up ‹ but that is an interim state.  I¹m now converting
> the various modules, pushing the queries into a single application scoped
> CFC, etc.  It¹s going well.
>
> My particular problem relates to a page which allows the customer to
> configure a page with one of several plugins (for example, an RSS reader
> or
> an open text area or a calendar, etc.), each of which could have its own
> configuration.  The current setup is a godawful mess, so I sat down to
> actually a write a functional spec and a technical spec, describing each
> method, etc. which would be used to generate the page.
>
> The question is this.
>
> If I call for example, this page: http://www.blahblah.com/moduleID/77 ‹
> the
> page processes, pulls the configuration for each plugin used on that page,
> then displays them in the user specified order.  I  originally was
> thinking
> that each time its called, it processes the logic (which exists in a
> application scoped page processing CFC).  The I had the bright idea ‹ what
> if I created it as an object instead:
>
> #application.pg.method(parameters)  -- processes
> every
> time
>
> Vs.
>
>  application.foo=#application.pg.method(parameters)
> #foo# -- > creates the object once with parameters
> and
> reuses it
>
> I don¹t even even know if this makes sense.  I¹m thinking in terms of
> reducing the load of processing the page every time, because it¹s already
> built, but the problem is there could potentially be thousands of these
> objects floating around ‹ one for each page for each customer website.
>
> So the more I think about it, the more confused I get.  Thoughts?
>
> More relevant info: I have memory and processor to spare on my server, but
> once or twice I¹ve hit the limit of what my instance of coldfusion can
> support.  Right now it¹s configured with a min heap of 512 Mb and a max
> just
> shy of 1 Gb.  I don¹t think it can go any higher, and I¹m not sure I¹m
> competent to consider going to multiple instances of CF yet.
>
>
>
> 

~|
Introducing the Fusion Authority Quarterly Update. 80 pages of hard-hitting,
up-to-date ColdFusion information by your peers, delivered to your door four 
times a year.
http://www.fusionauthority.com/quarterly

Archive: 
http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:257245
Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm
Unsubscribe: 
http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4


To object or not to object

2006-10-17 Thread Charles Sheehan-Miles
Hi all,

I¹m brand new to CF7 and persistent CFCs and the like, and I¹m seeking
advice.  Here¹s the lowdown:

I have a content management application that has about the thousand
templates, all badly written spaghetti code, etc., which I¹m in the process
of cleaning up.  I¹ve put together a framework that seems to work well ‹
performance is way up ‹ but that is an interim state.  I¹m now converting
the various modules, pushing the queries into a single application scoped
CFC, etc.  It¹s going well.

My particular problem relates to a page which allows the customer to
configure a page with one of several plugins (for example, an RSS reader or
an open text area or a calendar, etc.), each of which could have its own
configuration.  The current setup is a godawful mess, so I sat down to
actually a write a functional spec and a technical spec, describing each
method, etc. which would be used to generate the page.

The question is this.

If I call for example, this page: http://www.blahblah.com/moduleID/77 ‹ the
page processes, pulls the configuration for each plugin used on that page,
then displays them in the user specified order.  I  originally was thinking
that each time its called, it processes the logic (which exists in a
application scoped page processing CFC).  The I had the bright idea ‹ what
if I created it as an object instead:

#application.pg.method(parameters)  -- processes every
time

Vs. 


#foo# -- > creates the object once with parameters and
reuses it

I don¹t even even know if this makes sense.  I¹m thinking in terms of
reducing the load of processing the page every time, because it¹s already
built, but the problem is there could potentially be thousands of these
objects floating around ‹ one for each page for each customer website.

So the more I think about it, the more confused I get.  Thoughts?

More relevant info: I have memory and processor to spare on my server, but
once or twice I¹ve hit the limit of what my instance of coldfusion can
support.  Right now it¹s configured with a min heap of 512 Mb and a max just
shy of 1 Gb.  I don¹t think it can go any higher, and I¹m not sure I¹m
competent to consider going to multiple instances of CF yet.



~|
Introducing the Fusion Authority Quarterly Update. 80 pages of hard-hitting,
up-to-date ColdFusion information by your peers, delivered to your door four 
times a year.
http://www.fusionauthority.com/quarterly

Archive: 
http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:257130
Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4