Ok…so I have a simple app framework set up to do some proof of concept with a team of developers. The most significant thing that will keep me from getting adoption is the speed…take a look at a common request.
10:05:48.558 AM 6 ms invoking runEvent [Main.onRequestStart]
10:05:57.417 AM 7 ms rendering View [Widgets/ParentSubNavigation.cfm]
10:05:57.422 AM 1573 ms invoking runEvent [Dashboard:Widgets.ParentSubNavigation]
10:06:03.28 AM 7 ms rendering View [Widgets/QuickStats.cfm]
10:06:03.33 AM 2799 ms invoking runEvent [Dashboard:Widgets.QuickStats]
10:06:07.783 AM 9 ms rendering View [Widgets/RelatedArticles.cfm]
10:06:07.788 AM 1945 ms invoking runEvent [Dashboard:Widgets.RelatedArticles]
10:06:13.615 AM 8 ms rendering View [Widgets/FeaturedPosts.cfm]
10:06:13.620 AM 2080 ms invoking runEvent [Dashboard:Widgets.FeaturedPosts]
10:06:13.631 AM 22963 ms invoking runEvent [Dashboard:home.index]
10:06:24.520 AM 15 ms rendering View [home/index.cfm]
10:06:24.526 AM 9713 ms rendering Layout [Layout.Main.cfm]
I used a technique of creating a “widget” handler only used for runevent commands so that I can easily build sub-navigation and well (left/right) content from within a module to the parent layout. Works like a charm and the individual views that are collected only contain a few lines of HTML right now…but in this sample, the four that are called (dashboard:widgets) have HUGE rendering times as does the final layout. I have employed some plugins in the modules, an AOP aspect to inhibit display for any method used in the “main” module controller (“home”) and a view mapped singletons for some sample database interaction (very very minor).
Is runEvent inherently really really slow? I’ve littered some log entries in the code but since no errors are being thrown, they are not much help. Then, I started putting log entries in ondicomplete code where I can to ensure that code is not being repetitively run where not necessary…nothing yet, but still debugging.
Keep in mind, this site virtually does nothing where the user is concerned, but for CB I am using multiple modules (6 modules), plugins (1 core, 1 per module), AOP (1), about 3 service-type models and 3 transient models in two of the modules and a couple of each of the same in the “core” application. So my bet is I’m overlooking something.
This is running locally on a fully patched CF 9.01 and Apache on a windows 7 computer with SQL Server as the DB. While this is not my first rodeo, this is the biggest thing I’ve yet done with CB employing almost every “core-ish” feature (log, wire, aop, intercept, plugin, module)…again, to proof of concept to the team I work with.
So I guess what I’m asking is what “common” things have those of you with vastly more experience than I with CB encountered that would create such a slow-down…or what can I debug for that might help me find what might be creating the slow down? Of course, this won’t stop me from showing it today (yes, today) and just begging for them to excuse the speed issue I’m working on…my hope is that the other developers are much more interested in the guts of the site than it’s speed, for now.