Use generic tools like firebug to get a good feel for what really happens in your browser. How many files are requested? How long does everything take?
Some common problems and solutions:
Also dead unused code can take up a lot of unnecessary space. Google closure can help you detect it. Especially with big webgis projects it is easy to have unused code. Openlayers, for instance, almost surely has functionality that you don’t need. A minimal openlayers client with WMS only has to be 40kb minified and gzipped!
Lot of repeated request. Browsers requesting items over and over and over again. Set cache headers (for instance with apache’s mod_expires module). Allow the client to cache items.
Look at yslow to get extra tips on improving your page speed.
Tile your map. It helps improve the user-percieved speed. And especially for static maps that can be cached, it helps the speed enormeously. And something like mapproxy/tilecache/geowebcache can help you further. You can take a hybrid approach with static data via tiles and dynamic data with a generic WMS request.
My name is Reinout van Rees and I work a lot with Python (programming language) and Django (website framework). I live in The Netherlands and I'm happily married to Annie van Rees-Kooiman.
Most of my website content is in my weblog. You can keep up to date by subscribing to the automatic feeds (for instance with Google reader):