Extension:Foxway/How it can make MediaWiki faster

How it should work in my understanding. Do not take these examples literally, they show only the principle.

Example 1. There is wiki markup only.
Source of wiki page :

WELCOME
some text

When saving a page:

 * $title is
 * $pageSource is
 * $parsed['html'] is

When requesting the page:

 * $title is
 * return is

There is no need to cache

Example 2. add php code for foxway
Source of wiki page :

WELCOME
echo 'Hello!'; some text

When saving a page:

 * $title is
 * $pageSource is
 * $parsed['html'] is
 * $marker is
 * $code is

When requesting the page:

 * $title is
 * $parsed['html'] is
 * $marker is
 * $tmp is
 * return is

Time is spent for foxway: compileTime:     0.00038 secs serialisedTime:  0.00001 secs unserialisedTime: 0.00001 secs runtime:         0.00005 secs

cache usage
There may be used cache and cache may be smart. One can decide whether to caching based on attendance and runtime foxway.