Implementing the 'linkToStyleSheet' macro may cause serious performance hit to busy Manila[dot accent] Servers. Erin Clerico pointed out to me yesterday that the KCSOS sever was working much harder than usual. It was just plain slow. Erin noticed that one file was being called more often than any other. It was the CSS for our (very popular) home page.Since the KCSOS home page is so popular we have Manila render that site to a dedicated static server. In addition all images and binary files (gems) are served from this static server. This setup allows our Manila server to focus on our client's web sites and our lower volume departmental sites. Apart from the creation and management of the KCSOS home page, Manila should not have any part of serving it to the public. However, the "stylesheet.css" was being served by Manila directly, due to my use of the "linkToStyleSheet" Macro. LinkToStyleSheet is a new macro that allows for external Style sheets in Manila. Until its development, Manila served all CSS inline with the html. That system works fine but it's hard to shield Netscape 4.x and other non-CSS compliant browsers from the Stylesheet. Plus external style sheets are better since in theory they cache, and require fewer server resources to serve. The problem with "linkToStyleSheet" is that it serves the styleSheet directly out of the object database - it should go through the motions of writing the file out to the local static server and then the macro should calculate the URL from there. According to Erin, these are the steps that Manila goes though to serve this simple text document. "It retrieve a URL for the Gems directory of a particular site, add the file name 'styleSheet.txt' to the URL.Then the browser makes a requst of that URL. Frontier builds a PTA for the request, then inserts a new "word processing" object in the PTA replacing the template, coercing a string in to it and returns the result. So, a request for that page in Manila causes Manila to serve two pages." After removing that macro from the site, and simply linking to a standard CSS text file on our static server, Manila returned it to its usual responsive self.
[Source: BryanBell.com]
2:14:46 PM
|
|