Performance Improvement – Possible Side Effects
I have discovered an area of the DearDiary code that is hopelessly inefficient, and that is the area that generates the diary Indexes – that’s to say, either the calendar listing or the ‘long listing’ of your entries. To cut a long story hopefully somewhat shorter, the code would ask for ALL entry data from the database for that diary, possibly stretching back of DD’s 6 year history, even if it was only going to display the last 3 months of it. As you can imagine, for the busy diaries with lots of entries, this is pretty awful.
I have adjusted the query to limit the number of entries that DD will look for to 150. This is a hard coded ‘magic number’ which is a coding practise I hate but it is nothing more than a sticky plaster to hopefully Band Aid a somewhat sluggishly performing server of late. This whole area is being radically redesigned at the moment anyway so it’s a temporary fix.
It does possibly mean that your Diary Index isn’t showing you all the months you expected – or appears to have missing entries. There may be side effects to this that I haven’t considered – so if you think you’re experiencing weirdness with your Calendar or some entries aren’t appearing properly on your Index or Welcome page, please drop me a note. I shall try to set the ‘magic number’ at a level where I don’t think anyone will be affected but still give the database server half a chance of sending everything out 🙂
Thanks for your patience,
You know what’s amazing to me? You understand all this! I just sit here reading, and nodding my head wisely, and hoping some of your knowledge and expertise will sort of rub off on me.
Thanks again for you work!
PS: Merry Christmas, Happy Hanukkah, a Kwality Kwansa, a Satisfying Saturnalia, and a Yowza of a New Year!
did you get my suggestion on MSN yesterday stevie poo?
It’s been 6 years for real? I was just guessing around when I figured I started here a little over 5 years ago. But wow.
Have fun with your index issue. I didn’t really notice any slowness.
I was in my old diary here that’s private now but it should go back to like 2000 but it doesn’t. It goes back to 02 and I quit writing there in 03 so I don’t know if that’s anything to do with your adjusting that whole diary thing or not.