Object instantiation and heap size in ColdFusion - Part II

Having failed to write a satisfactory parsing and indexing routine in my Model-Glue app for my content system to push documents to Apache Solr, I decided to write a routine that used my CFC layer to retrieve and index the objects, but I removed them from the Model-Glue application and executed them from a standalone template. I got a bit more headroom out of that method, but the heap still grew until it hit the ceiling and the application died.

Not ready to conceed defeat, I decided to write a standalone indexing routine in purely procedural code to see how the routines compared. I had been very surprised to find the issues with heap size in my first attempt, and I wanted to see if writing code in a procedural manner made any difference.

I pulled out the functionality from my application to read objects from the database, create an XML document, add the objects to the XML document, and submit the XML document to the Solr engine for indexing. I used a single standalone template and a custom tag for my indexing engine. In my first attempt at indexing 10,000 documents, I found the engine was able to push more documents at a higher pace than either the Model-Glue app or the component-based standalone app. More surprisingly, I found that the Java heap never went above 60 MB- more or less what I would expect for a system that was properly handling memory.

Does this mean we should all go back to writing procedural code in ColdFusion? I don't think so, but I would love to see the heap issue resolved in a future release.

Comments
uggs sale's Gravatar The grass is greener on <a href="http://www.uggssale.org/">uggs online sale</a> the other side of the fence.God helps those who help themselves.A little knowledge is dangerous.A good <a href="http://www.uggssale.org/">uggs outlet</a> medicine tastes bitter.
# Posted By uggs sale | 2/2/10 11:53 AM
BlogCFC was created by Raymond Camden. This blog is running version 5.8.001.