Monday, April 27, 2009

Transient Objects in ColdFusion

I really want to start using transient objects in ColdFusion, but the performance hit is just not worth it. Hopefully that gets fixed in CF9, otherwise I might have to switch over to Groovy/Java just to enjoy coding again.

2 comments:

  1. What is too slow? I've found that CF8 objects are actually pretty freaking fast, but most libraries tend to add a lot of overhead. Now they're still slower than Groovy/Ruby, but they're not as slow as people think.

    For instance getting 500 new objects from Transfer is at least 5x slower than calling createObject() and populating the objects yourself from the database. Once the object is cached it's still about 2x slower than manually creating the objects.

    I'm not saying don't use Transfer (we certainly do), but be aware that a lot of slowness is from the complication of any given library (logging, reporting, caching, lots of indirection, over/misuse use of patterns, etc.).

    ReplyDelete
  2. I'll admit object creation has sped up quite a bit in the last couple releases of CF, but it still doesn't compare to Groovy/Java.

    And while I think Transfer is a really great tool for ColdFusion, I think the biggest downside of Transfer (which isn't really a fault of Transfer itself) is that still needs to fall back on using queries at times due to the performance hit of retrieving a large set of objects.

    ReplyDelete