Skip to content

ModelGlue 3.2 Reload Changes

dskaggs edited this page Jan 9, 2013 · 2 revisions

As of version 3.2, Model-Glue will load only the internals necessary to fulfill the current request, in contrast to the LoadItAllNow architecture of previous versions. This technique is called Memoization, an optimization technique used primarily to speed up computer programs by having function calls avoid repeating the calculation of results for previously-processed inputs. Also, Model-Glue will now optionally keep the internal state of your bean factory across reloads, saving you from reloading all of your ColdSpring-managed objects on each request.

See this article on [wiki:FAQs/HowCanISpeedUpReloadTimes How Can I Speed Up Reload Times] for more info.

Results

A picture is worth a thousand words, so we put together a timing test to show you the differences. The timing tests use progressively more Model-Glue objects, and are designed to show you the reload times at 3 phases of the application. Note: these tests only deal with Model Glue objects like Controllers and Event-Handlers. Real world applications also will incur loading times with Model objects. Since Model objects are largely out of the control of Model-Glue and Model objects vary in design and loading times, we left them out of the tests. Keep in mind, you can maintain your bean factory (and model objects) across requests as we mentioned above.

Three Phases of Testing:

  • Initial Startup: ColdFusion is fully started. The test application is hit for the first time.
  • First Reinitialization: The application is reloaded once after being hit for the first time.
  • Second Reinitialization: The application is reloaded a second time.

Test Steps:

  • Start ColdFusion
  • Log into CF admin
  • Browse to index.cfm
  • Note startup time reported
  • Browse to index.cfm using the application reload flag
  • Note startup time reported
  • Browse to index.cfm using the application reload flag
  • Note startup time reported
  • Shut down ColdFusion

Performance Result Charts

Initial Startup

Image(Timing_Cold_Init.png)

First Reinitialization

Image(Timing_First_Re-Init.png)

Second Reinitialization

Image(Timing_Second_Re-Init.png)

Conclusion

As you can see, the application load times markedly increase about the 200 object mark. This difference is enormous at the 2000 object mark (tested as 1000 Controllers and 1000 Event-Handlers). With the new changes, our timing curve of the new version is much flatter than the timing curve of the previous version. We hope this makes a difference in your development time and helps Model-Glue remain a high-productivity tool for building awesome applications!

Clone this wiki locally