We are pulling in hierarchical data into our Coldfusion application and parse it into numerous CFCs. The CFC in question stores an array of its children, which are also instances of the same type of component. Parsing some of this data may lead to having to create 100 or more (the most ever would be like 300) CFCs by the time it is done...
Sometimes, creating all of these CFCs can take only 50-75ms, sometimes it takes 1000-1250ms. (I made a script that loops and just creates and stores these objects, using GetTickCount() to keep track of the speed.) I know server load probably has a lot to do with this, but was wondering if there was some way to improve the performance of creating these objects?
(The first battle was getting all of the data for these objects in one DB call, which we were able to do, but now that runs consistently, we found that instantiating a bunch of these CFCs may also be a bottleneck.)