Compound Theory

v2.0

Categories

  1. Transfer
  2. ColdFusion
  3. JRuby
  4. Java
  5. ColdSpring
  6. Squabble
  7. JavaLoader
  8. ColdDoc
  9. 2ddu
  10. AsyncHTTP
  11. OO Analysis and Design
  12. Flex
  13. Railo
  14. XML / XSL
  15. Hibernate
  16. ColdFusion Builder
  17. Fall
  18. Ubuntu
  19. XHTML / CSS
  20. Eclipse
  21. Git
  22. Oracle Database
  23. Usability / UI Design
  24. webDU
  25. cf.Objective()
  26. LWJGL
  27. cf.Objective(ANZ)
  28. Captcha
  29. MAX
  30. Melbourne CFUG
  31. Martial Arts
  32. Random Things
  33. Conduit

Recent Posts

Projects

Recent Comments

Performance Improvements for Transfer

Last week we had Robin Hilliard of Rocketboots into the office to help us get the biggest bang for our buck performance wise with the Transfer / MachII / ColdSpring application, and I have to say it was a great session all around.

Apart from imparting upon us a great many ideas for aspects of our application we could cache, and various other pearls of wisdom, we turned on Report Execution Times, and managed to find several key places in Transfer that were sometimes called over 500 times in one request (we do a fair amount of data movement per request).

For one thing, in all honesty, I had completely forgotten about Report Execution Times.  I had turned it off when it was making my CFC heavy applications go into a slow paced crawl, and had quite literally left it for dust.

However, after turning it on, and just running it over just a few requests, the key areas of Transfer that would provide significant performance increases became very apparent very quickly.

This is where all those small, finicky, performance 'tricks' come to the fore very quick -

It should be worth noting, that by doing some of these things, the code ended up looking rather ugly, but with testing, performs faster than before.  So this is not to say that I went through the entire Transfer codebase and switched out everything I could find to being the most efficient I could possibly, in fact that couldn't be further from the truth.  There are many places in Transfer that use case statements, even knowing that else/if statements are faster - simply because I find case statements are more readable, and they are not in places of the system that are called in numerous succession.  By the same token, I make extensive use of Java iterators to loop over my collections in Transfer, as they provide a high degree of abstraction away from what sort of Collection is being used behind the scenes, but those places are now limited.  However, by specifically pin pointing aspects of the system that are critical to the performance of the framework, the necessary tweaks to the framework could be discovered and acted upon.

So say thanks for Robin for the new performance improvements for Transfer that can now be found in SVN.



Comments

Posted by Katsuyuki Sakai on 01 July 2007 11:12 PM

Could you please tell me how to check out from SVN?
Thank you.

Posted by Katsuyuki Sakai on 02 July 2007 07:08 AM

OK. I found the way.
$ svn co http://svn.riaforge.org/transfer/trunk/transfer/

I'll try new Transfer now.

Posted by DanielD on 02 July 2007 10:52 AM

Do you see the same speed increase between the 2 version when you run the code against CF8?

Posted by Mark on 02 July 2007 01:28 PM

@Daniel: The speed increase should be relatively similar between the two versions. Why do you ask?

Posted by Robin Hilliard on 02 July 2007 11:15 PM

Hi Mark,

Yes, it's often surprising what turns up when you look at execution counts - they're a great pointer to working out what code really needs to be optimised (limiting the ugliness as much as possible) and leaving the rest in it's full architectural splendour. As that Knuth fella says: "Early optimisation is the root of all evil".

Cheers,
Robin

Posted by ziggy on 03 July 2007 05:51 PM

Off topic, but is there any hope of your making Transfer work on Bluedragon 7?

Posted by Mark on 04 July 2007 09:25 AM

@ziggy: it's on the roadmap, but don't be expecting it in a short time frame...

Posted by CraigW on 06 July 2007 05:38 AM

Mark, absolutely excellent work, your ORM library is insanely powerful. Hats off to you, sir!

Add Comment