Taking Time Out
I felt quite smug this morning. Through changing just one line of code I made an application load an amazing five times faster. Whereas users waited 2.5s for the homepage to "load" they now wait a mere 0.5s!! Check me out. Who the daddy? And all this on a Monday following a Stag weekend*.
Actually, I shouldn't be so smug, as it was no big deal. It's just strange that the delay was there in the first place. When the database was opened a "launcher" Page is used. The onload event of this page is was:
setTimeout('fullScreen()', "2500")
After 2.5s a function launches the real homepage in a new full-sized window. In the mean time the user is left looking at the launcher page, which has a fancy progress bar animated GIF and a message telling them the system is "loading". Now, this wasn't seen as a problem and so wasn't on my list of things of to do, but curiosity got the better of me and I went in search of the answer to "Why?". As a Domino developer I couldn't think what on earth was being loaded. As I suspected, there was nothing there at all. It's just a pointless wait, programmed in for no apparent reason. The only explanation I can think of is that the original developer liked animated gifs or had just discovered the timeout method and couldn't help himself. Either way there's no excuse for it being there. If you multiplied the number of users who logged in each day by the number of times they do by 2.5s you're looking at hours of wasted time!
So, I went ahead and reduced the wait to 500ms. I suppose I should have removed it completely, but, as I wasn't actually asked to do anything about it, I didn't want to bamboozle the users who have probably grown accustomed to this wait. They'd probably think it was broken or something. If anybody notices and mentions the change I'll just tell them I "tweaked the back-end code to make it load faster". Hey, technically, I won't be lying ;o)
* With old uni pals - that I've slowly lost touch with over the last 8 years - who only managed to track me down via a Google. It's good having a name you don't share with many others...
Hey Jake!
I saw this same thing in the webmailredirect.nsf out of the sandbox - drove me nuts!
It has to be a "UI for UI's sake" decision - slowing down the redirect just so you can tell a user that you're redirecting them.
Also - bravo on the redev!
-Chris