On a php application where page requests are made almost every second. So if there are 100 people using the application at the same time on the same server it's gonna be a big server load. So the applicatoin will first load all the templates into the browser so that further http requests are only gonna need php to return the required variables instead of loading the whole page every time.
Original: some {{template}} stuff
Parsed: some monkey stuff
Original: some {{more}} {{template}} stuff
Parsed: some added monkey stuff
Original: some {{template}} {{stuff}}
Parsed: some monkey things
Original: some {{more}} {{template}} {{stuff}}
Parsed: some added monkey things
you'll need an XMLHTTP engine or other partial request generators of some fashion to transport the variables...
What I think is important to add here is that xmlHTTP does not actually greatly decrease server load, as generally all the code that would run if it were a normal page load would run for a xmlHTTP request. Where the big kicker with xmlHTTP is, at least in my humble opinion, is bandwidth and UI. Sure I have to inform all my users that they shouldn't expect the whole page to reload (as they tend to hit refresh when nothing seems to be happening, you would think they would notice blocks of text changing..), but that portions will be updated at a time. It is still worth the hassle. And of course, it should always degrade nicely... or nicely enough
the memory used by an output is often quite small, compared to the space occupied by the database and time required for it to return data and various other things..