CF9 import EXTREMELY SLOW without Component Cache
ColdFusion 9 has two new features for components. The import statement allows you to use shorter names for components when creating them. The “Component Cache” caches the path to components (pretty much Trusted Cache for .cfc files only) to improve performance. Unfortunately there’s a huge performance problem using the import statement without the Component Cache turned on. Worse, even with “Cache in Request” turned on the performance hit is still the same for every creation.
This performance hit is not some small amount. Creating an empty component that’s imported will cost anywhere from 8-16ms without the cache. That makes CF7 createObject() performance look fast!
Definitely go bug Adobe about this because this kind of performance hit makes import useless. Until it’s fixed leaving component cache off will quickly cripple any new CF9 app and makes development a lot slower too.
Here’s the bug ticket: Bug 83864
The reason you might disable Component Cache is because the feature is quite buggy and has a tendency to resolve components to the wrong locations between applications that use application specific mappings. Meaning that most shared hosts will probably need to leave this off. That means that object creation performance is going to be terrible on shared hosts if you use import and don’t qualify your components, and qualifying them and still using import rather defeats the purpose.
One comment on “CF9 import EXTREMELY SLOW without Component Cache”
Pingback: Tweets that mention CF9 import EXTREMELY SLOW without Component Cache - Elliott's Development Blog -- Topsy.com