As a Drupal developer - do you do this?
Do you go through watchdog, find every error and fix it? You probably should - and here's why:
If there's even just a Notice, it means something's not right - checking it out might reveal something far more important.
Every error that goes to Watchdog is consuming valuable processing time. I had an instance quite recently where an error in a third party module was generating 10,000 notices per page. And the original author never noticed. That's ten thousand database writes. As you might imagine fixing it speeded things up quite dramatically.
When you can load any page on your website and have no reports added to the watchdog - you know your site is good.
Eventually I came to look at the code and it was possibly the most abysmally written code I have ever seen.
Imagine this code was baking 100 cookies, here's what it did.
- Fetch the ingredients from the cupboard;
- Get out enough for 1 cookie;
- Put the ingredients back in the cupboard;
- Mix the ingredients;
- Cut the cookie;
- Cook the cookie until done;
Repeat 100 times.
It worked, but it was stupid and used the most inefficient jQuery selectors imaginable, and even when it knew what object it wanted to act on (because it had already found it) it would make jQuery find it again, using exactly the same, useless, selector. The same coder, I later discovered, who in another script had written $('#x').parent().parent().parent().parent().parent().parent().parent().parent();
I re-coded it to make 100 cookies in a single batch. Start-up time <1sec.
This is a good site for jQuery optimisation: http://hungred.com/useful-information/jquery-optimization-tips-and-tricks/