Async Web Parts in SharePoint 2007/2010

Some of you may have seen my tweet:  "#sp2010 web parts have a new "AJAX Options" in the tool pane, u can enable "Asyncronous refresh" for each web part. Be careful w this!"

Why?  It reminded me of a little known fact when creating async tasks server side with web parts.  You should watch out for the asnyc page loading of web parts because of this setting in the web.config file:

In SharePoint 2007, WebPartWorkItem has default setting of 7000ms.
In SharePoint 2010,  guess what!  The WebPartWorkItem section is GONE (even though a sectionhandler still exists)!  What the default is these days…who knows!?!  I'm guessing it is still 7000ms.

Anything registered with RegisterWorkItemCallback will be included in the timeout (can cause later web parts to error if a previous web part uses it all).  It is described in an article hidden waaaayyyy down in the bowels of MSDN:  http://bit.ly/1tALlt

Again, be careful with this when running async operation on the server – convert as much as you can to Client Object Model (AJAX)! 

Now, let me tell you, *most* web parts in SharePoint 2010 are being loaded via AJAX,  this means no more annoying full page refreshes of each web part on a page, we can refresh them separately from each other!  Sweet!

Chris