As is seen from above, we have used the buffering mechanism
provided by ASP.NET 2.0 to render the images in the page-pic.aspx. These
images, however, are all generated dynamically in the server side, when a good
many resources are to be consumed. On the other hand, quite a few small
pictures might be repeatedly rendered since we have rasterized the output. Thus,
we can find a way of optimizing this by cutting the whole map into small static
ones beforehand so as to simplify the image processing on the server side and
accordingly improve the performance of the system.
We can easily build a small program to generate these small
pieces of pictures automatically (the source code along with this article
provides such a tool program named SplitPic). Obviously, with the small
pictures changed into static ones, the AjaxMethod GetMapInfo on the server side
needs to be modified correspondingly. I have left out the new code, for more
details please see the downloaded source code.