|
Mailing Lists
|
Home /
Groups /
ColdFusion Talk (CF-Talk)
Is this Application cfm abuse?
Author: Brian Kotek
Short Link: http://www.houseoffusion.com/groups/cf-talk/thread.cfm/threadid:56157#304155
Very true, I missed the "dump" part.
As far as things in the application scope, 500k is not a lot. For the 25,000
variables, that does seem like a lot, but it probably depends on what that
means. Are there CFCs in the application scope? Is the app using a framework
like Fusebox? Is it using ColdSpring? All of those things will put data and
CFC instances into the application scope, so if that is the case and it is a
large app, I could easily see 500k of data in the application scope.
On Thu, Apr 24, 2008 at 8:35 AM, Camer
----- Excess quoted text cut - see Original Post for more -----
Author: Cameron Childress
Short Link: http://www.houseoffusion.com/groups/cf-talk/thread.cfm/threadid:56157#304153
He said "when I dumped the application scope".
But you are right. CFMX 6.1 wouldn't even execute a file longer than ~10k
lines. I haven't come across code that heinous since then.
-Cameron
On Thu, Apr 24, 2008 at 8:18 AM, Brian Kotek <brian428@gmail.com> wrote:
> However, if he means that the file itself is actually 25,000 lines of
> code,
> and that when he saved it the file size was 500k, then yes, I'd say that
> is
> almost definitely a very bad design choice.
>
>
--
Cameron Childress
Sumo Consulting Inc
http://www.sumoc.com
---
cell: 678.637.5072
aim: cameroncf
email: cameronc@gmail.com
Author: Brian Kotek
Short Link: http://www.houseoffusion.com/groups/cf-talk/thread.cfm/threadid:56157#304150
However, if he means that the file itself is actually 25,000 lines of code,
and that when he saved it the file size was 500k, then yes, I'd say that is
almost definitely a very bad design choice.
On Thu, Apr 24, 2008 at 7:01 AM, Camer
----- Excess quoted text cut - see Original Post for more -----
Author: Cameron Childress
Short Link: http://www.houseoffusion.com/groups/cf-talk/thread.cfm/threadid:56157#304148
Not really, as long as it makes sense in the larger context of the
application. If you are looking for a rule of thumb here, I would make it
Never do this:
<cfdump var="#application#"/>
:)
-Cameron
> I'm working on a project and when I dumped the application scope there
> were over 25,000 lines of variables and struct items. When I saved all of
> this it was over 500k. Does this seem unusual?
Author: Jon Clausen
Short Link: http://www.houseoffusion.com/groups/cf-talk/thread.cfm/threadid:56157#304122
John,
It depends on the application, though I don't think 500k is
particularly high. The apps I have built using FarCry seem to use
about 375-400kb on app init - before any queries are cached (those are
on 3.5 so much has probably changed in 4.0 and the new release
upcoming).
Between query and object caching, I think if the way the application
is used and the server can justify the memory usage it's not too much
of a concern. The biggest application scope abuse I've seen is using
it to store data that should be maintained in session, client, or even
request. This results in a ton of updating of application variables
and excessive locking in some cases.
It might be bad form to use an excessive amount of memory on shared
hosting, though.
Jon
On Apr 23, 2008, at 5:16 PM, John Engstrom wrote:
> I'm working on a project and when I dumped the application scope
> there were over 25,000 lines of variables and struct items. When I
> saved all of this it was over 500k. Does this seem unusual?
Author: Josh Nathanson
Short Link: http://www.houseoffusion.com/groups/cf-talk/thread.cfm/threadid:56157#304113
> I'm working on a project and when I dumped the application scope there
> were over 25,000 lines of variables and struct items. When I saved all of
> this it was over 500k. Does this seem unusual?
That seems pretty excessive. Do you mean there were 25K lines in
Application.cfm, or there were 25K variables in the Application scope, or
some combination thereof?
-- Josh
Author: Nathan Strutz
Short Link: http://www.houseoffusion.com/groups/cf-talk/thread.cfm/threadid:56157#304114
Hmm, it depends.
500k of application memory doesn't really sound bad - how much memory does
the server have - I'm sure 500kb doesn't really matter.
As far as abusing the application scope - is the data well organized? Are
the variables logically named? Are they correctly scoped? They should not be
related to any clients using the system, but are indeed application
configuration settings. Are they values that are better left in a stylesheet
or on a page-configuration level as opposed to an application configuration
level?
If the data is a lot of manually cached queries or data, this, too, would
make sense, though it might be better to make a reusable caching service.
The newer way of handling application configuration settings is probably
something more along the lines of hiding a lot of the configuration through
a CFC or CFCs and make the application configuration a managed data process.
One of the best things I've seen is putting many of these settings in a
coldspring services.xml file and providing settings where they are needed
instead of globally to the entire application.
YMMV (Your Mileage May Vary) and it really depends on the application and
the implementation.
--
nathan strutz
http://www.dopefly.com/
> I'm working on a project and when I dumped the application scope there
> were over 25,000 lines of variables and struct items. When I saved all of
> this it was over 500k. Does this seem unusual?
Author: John Engstrom
Short Link: http://www.houseoffusion.com/groups/cf-talk/thread.cfm/threadid:56157#304110
I'm working on a project and when I dumped the application scope there were over
25,000 lines of variables and struct items. When I saved all of this it was over
500k. Does this seem unusual?
|
May 24, 2012
|
Latest Fusion Authority Articles
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||