On Dec 8, 2004, at 9:25 PM, Guillaume Blanchard wrote:
Do you load extension only when used into text?
If not, we can include_once() those modules only when we found the
corresponding markup.
Extensions are loaded from LocalSettings.php. You could split an
extension into a stub initialiser/hook setup file and a 'guts' file,
which might be worth it if it's very long and will be used on a site
that can't install an opcode cache.
How many SQL access are needed to render an empty
page?
For a file cache hit we're down to this:
BEGIN
SELECT N FROM user_newtalk WHERE user_ip='X'
SELECT cur_id FROM cur WHERE cur_namespace='X' LIMIT N
SELECT cur_touched,cur_is_redirect FROM cur WHERE cur_id='X' LIMIT N
UPDATE LOW_PRIORITY site_stats SET
ss_total_views=(ss_total_views+N),ss_total_edits=(ss_total_edits),ss_goo
d_articles=(ss_good_articles) WHERE ss_row_id=N
UPDATE cur SET cur_counter = cur_counter + N WHERE cur_id = N
COMMIT
These take a couple milliseconds even in good times, but without a PHP
opcode cache (Turck etc) they are dwarfed by PHP parsing by about a
factor of 50.
A page render or parser cache hit will take a few more queries to load
the message cache, the page data, and the parser cache data (if any)
and a few individual link checks. A logged-in user will also load some
user data and check watchlist status.
How many per link?
Links in the body of a wiki page are saved up and checked in large
chunked queries (one per namespace). Template inclusions and links in
the skin are checked individually as they are found. If you turn on the
stub threshold, a query must be run for every link.
-- brion vibber (brion @
pobox.com)