Model-Glue .. 1.3 seconds to load a simple form?

6 views
Skip to first unread message

Brettski

unread,
Sep 24, 2009, 9:23:10 PM9/24/09
to model-glue
Hi,

I'm starting to eval model-glue.. I worked through the tutorial, then
just added a form from an existing app..

It all works, but damm.... its slow. Especially compared to how the
app runs without a framework..

Even just to bring up the default root page takes 1.3 seconds..

The non-framework version of the page takes 9ms to load.

There is no queries or anything its just a form.

My dev machine is no slouch. 8Gb RAM 2.9 Ghz Dual Core Vista / IIS /
CF9. It's fast for everything, except model-glue..

Any ideas? I'm trying to drink the kool aid and tell myself frameworks
are a good thing but struggling to see this right now..



Model-Glue Debugging
Time Category Message
0ms Creation Event Context Created

1ms Initialization Beginning request phase.

333ms Event Queue Queueing event handler:
modelglue.onApplicationInitialization

336ms Event Handler Execute "modelglue.onApplicationInitialization"
<event-handler name="modelglue.onApplicationInitialization">
336ms Message Broadcast Broadcasting
"modelglue.loadFrameworkIntoScope"
<message name="modelglue.loadFrameworkIntoScope">
337ms Message Listener Invoking loadFrameworkIntoScope in
ModelGlue.gesture.modules.internal.initialization.controller.InitializationController
<message-listener message="modelglue.loadFrameworkIntoScope"
function="loadFrameworkIntoScope" />
340ms Event Queue Queueing event handler:
modelglue.onApplicationStoredInScope

341ms Initialization Request phase complete.

342ms Population Beginning request phase.

977ms Event Queue Queueing event handler:
modelglue.onEventContextCreation

979ms Event Handler Execute "modelglue.onApplicationStoredInScope"
<event-handler name="modelglue.onApplicationStoredInScope">
980ms Message Broadcast Broadcasting
"modelglue.onApplicationStoredInScope"
<message name="modelglue.onApplicationStoredInScope">
981ms Message Listener Invoking loadHelpers in
ModelGlue.gesture.modules.internal.initialization.controller.InitializationController
<message-listener message="modelglue.onApplicationStoredInScope"
function="loadHelpers" />
985ms Message Listener Invoking loadORMAdapter in
ModelGlue.gesture.modules.orm.controller.GenericORMController
<message-listener message="modelglue.onApplicationStoredInScope"
function="loadORMAdapter" />
987ms ORM No ORM adapter is configured. You will not be able to
scaffold or use generic database messages.

990ms Event Handler Execute "modelglue.onEventContextCreation"
<event-handler name="modelglue.onEventContextCreation">
990ms Message Broadcast Broadcasting
"modelglue.contextPopulationNeeded"
<message name="modelglue.contextPopulationNeeded">
991ms Message Listener Invoking loadPreservedState in
ModelGlue.gesture.modules.internal.population.controller.PopulationController
<message-listener message="modelglue.contextPopulationNeeded"
function="loadPreservedState" />
994ms Message Listener Invoking populateEventContext in
ModelGlue.gesture.modules.internal.population.controller.PopulationController
<message-listener message="modelglue.contextPopulationNeeded"
function="populateEventContext" />
1004ms Event Queue Queueing event handler:
modelglue.onEventContextPopulation

1005ms Population Request phase complete.

1005ms Configuration Beginning request phase.

1104ms Event Queue Queueing event handler:
modelglue.readyForModuleLoading

1105ms Event Queue Queueing event handler: modelglue.modulesLoaded

1108ms Event Handler Execute "modelglue.onEventContextPopulation"
<event-handler name="modelglue.onEventContextPopulation">
1108ms Message Broadcast Broadcasting
"modelglue.onEventContextPopulation"
<message name="modelglue.onEventContextPopulation">
1110ms Event Handler Execute "modelglue.readyForModuleLoading"
<event-handler name="modelglue.readyForModuleLoading">
1111ms Message Broadcast Broadcasting
"modelglue.readyForModuleLoading"
<message name="modelglue.readyForModuleLoading">
1112ms Message Listener Invoking loadInitialXMLModule in
ModelGlue.gesture.modules.internal.configuration.controller.ConfigurationController
<message-listener message="modelglue.readyForModuleLoading"
function="loadInitialXMLModule" />
1113ms Configuration Loading Initial XML Module

1249ms Event Handler Execute "modelglue.modulesLoaded"
<event-handler name="modelglue.modulesLoaded">
1250ms Message Broadcast Broadcasting "modelglue.modulesLoaded"
<message name="modelglue.modulesLoaded">
1251ms Message Listener Invoking generateEvent in
ModelGlue.gesture.modules.internal.generation.controller.GenerationController
<message-listener message="modelglue.modulesLoaded"
function="generateEvent" />
1255ms Configuration Request phase complete.

1255ms Invocation Beginning request phase.

1339ms Event Queue Queueing event handler:
modelglue.onApplicationStart

1340ms Event Queue Queueing event handler: modelglue.onRequestStart

1342ms Event Handler Execute "modelglue.onApplicationStart"
<event-handler name="modelglue.onApplicationStart">
1343ms Message Broadcast Broadcasting "onApplicationStart"
<message name="onApplicationStart">
1344ms Event Handler Execute "modelglue.onRequestStart"
<event-handler name="modelglue.onRequestStart">
1345ms Message Broadcast Broadcasting "onRequestStart"
<message name="onRequestStart">
1346ms Message Listener Invoking onRequestStart in
ModelGlue.gesture.modules.orm.controller.GenericORMController
<message-listener message="onRequestStart"
function="onRequestStart" />
1347ms ORM No ORM adapter is configured. You will not be able to
scaffold or use generic database messages.

1350ms Event Queue Queueing event handler: newPerformanceGroups

1352ms Event Handler Execute "newPerformanceGroups"
<event-handler name="newPerformanceGroups">
1353ms View Queue View queued: performancegroups/create.cfm

1354ms Event Handler Execute "modelglue.onQueueComplete"
<event-handler name="modelglue.onQueueComplete">
1355ms Message Broadcast Broadcasting "onQueueComplete"
<message name="onQueueComplete">
1356ms Views Rendering view "body" (performancegroups/create.cfm)
<include name="body" template="performancegroups/create.cfm" />
1386ms Event Queue Queueing event handler: modelglue.onRequestEnd

1388ms Event Handler Execute "modelglue.onRequestEnd"
<event-handler name="modelglue.onRequestEnd">
1389ms Message Broadcast Broadcasting "onRequestEnd"
<message name="onRequestEnd">
1391ms Invocation Request phase complete.

Charlie Griefer

unread,
Sep 24, 2009, 9:36:17 PM9/24/09
to model...@googlegroups.com
Do you have CF set to report execution times?

In ColdSpring.xml, are you set to reload="false"?  (reload="true" is actually my preference in dev.. it's slower, yes but saves me the hassle of reinitializing the framework after each change)
--
Charlie Griefer
http://charlie.griefer.com/

I have failed as much as I have succeeded. But I love my life. I love my wife. And I wish you my kind of success.

Fernando Lopez

unread,
Sep 24, 2009, 9:36:51 PM9/24/09
to model...@googlegroups.com
Have you changed the Coldspring value for Reinit?
If you have it as "true" the whole framework is being loaded every time you ask for a page.

If you set it to "false" the application will be 'slow' the first time because it has to load the framework in memory but after that it should give you faster results.

Fernando

Dan Wilson

unread,
Sep 24, 2009, 9:36:48 PM9/24/09
to model...@googlegroups.com
Right, well there is plenty of koolaid for all.  Drink often, drink deep.

As to your performance question, you are right to say 1.5 seconds is a long time for a form. MG is actually a lot faster than that, but you are killing it with your Report Execution Times setting being on.  Go into your CFAdmin, go to Debugging and untick Report Execution Times. You'll find the page loads are way, super duper faster.


Report Execution Times isn't really optimized for CFC based applications of any kind. Thi sis in part with how CFCs are constructed and invoked, but the main point is, you just can't use Report Execution Times with CFC heavy applications. It causes EVERYTHING to slow down and you get false times and slow loading.

So turn that off and try it again.

Want it to be even faster? Go into your /config/CondSpring.xml and change the reload value inside  modelglue.modelGlueConfiguration to false.

That means ModelGlue will cache a lot of these objects and subsequent page loads will REALLY be fast.

Remember to flip it back to true when you want to change a controller or a model object. It won't pick up your changes when reload is set to false because that is production mode. And we won't be changing that stuff in production mode.. know what I mean?


DW



On Thu, Sep 24, 2009 at 9:23 PM, Brettski <brett...@gmail.com> wrote:
--
“Come to the edge, he said. They said: We are afraid. Come to the edge, he said. They came. He pushed them and they flew.”

Guillaume Apollinaire quotes

Rich

unread,
Sep 24, 2009, 9:37:28 PM9/24/09
to model...@googlegroups.com
.... try turning off the ModelGlue debugging and/or NOT running in dev
mode then check your times again.... dev mode forces everything (the
entire framework) to reload with each request. Coldspring.xml

rich
Rich

Rich Leach
Advanced Certified Adobe ColdFusion Developer
ri...@cfsnap.com
http://www.cfsnap.com
303-913-7338
Instant Messenger:
AOL AIM: cfsnaprich
Instant Video Conference:
APPLE MobileMe: rich...@me.com


Brettski

unread,
Sep 24, 2009, 9:40:47 PM9/24/09
to model-glue
Wow, first of to you all thank you for the prompt responses :)

I did all your suggestions and its down to 19ms, more then acceptable,
actually thats awsome for our needs.. :)

I guess I will start to sip on the koolaid with more interest :)

Thanks guys, I'm sure I'll have a lot more dumb questions to come!

Victoria Ryder

unread,
Sep 24, 2009, 9:57:30 PM9/24/09
to model...@googlegroups.com
Hi, Brettski.

Have you tried running it with reload, debug, etc. set to false?
When in development, these configurations should be set to true so
that everything reloads on every request and you get the debug info
you need.

To see how it will run at production time, though, set those
configurations to false (assuming you haven't already).
After the initial run, you should see things speed up significantly.

Hope that helps.

Jared Rypka-Hauer

unread,
Oct 1, 2009, 3:00:52 PM10/1/09
to model...@googlegroups.com
There are no dumb questions, only... well, no, there are dumb questions.

I just don't see many of them cross these lists, though, because
making these transitions is never easy and there really are few
questions that are truly dumb.

J

Reply all
Reply to author
Forward
0 new messages