Appointment calendar is now faster

sunsetsystems wrote on Wednesday, March 23, 2005:

Has anyone noticed that the display of the appointment calendar can be really slow?  For example to display the weekly view for 4 doctors and a moderately full schedule took 38 seconds on a 3 GHz Athlon-based server here.

I just checked in a fix to speed this up.  The same display now takes 6 seconds, which is a lot better (but obviously you want to avoid the weekly view with multiple doctors whenever possible).  The daily view is similarly improved.

This fix required mixing some PHP code in with the Smarty code in the two templates involved.  Why?  Because Smarty is inadequate as a general-purpose programming language; it just can’t do certain things.  For this and other reasons I recommend avoiding it.

By the way you might need to clear your Smarty cache (Administration/Calendar Settings) after upgrading to this code.  Yet another reason to avoid Smarty.  :wink:

– Rod <rod at sunsetsystems dot com>

drbowen wrote on Thursday, March 24, 2005:

Thanks Rod,

This will help a lot.

Sam Bowen, MD