Optimize use of YUI in server-side route handlers