Difference between revisions of "Deferred.doc (MediaWiki)"

from HTYP, the free directory anyone can edit if they can prove to me that they're not a spambot
Jump to navigation Jump to search
m (minor formatting; edit log)
m (minor formatting; edit log)
Line 1: Line 1:
[[Techniques]]:
+
[[Techniques]]: Software: [[MediaWiki]]: [[MediaWikiDoc:Developer Documents|Developer Documents]]: [[MediaWikiDoc:Deferred.doc|Deferred.doc]]
Software: [[MediaWiki]]: [[MediaWikiDoc:Developer Documents|Developer
+
 
Documents]]: [[MediaWikiDoc:Deferred.doc|Deferred.doc]]
 
 
==Contents==
 
==Contents==
A few of the database updates required by various functions here can be
+
A few of the database updates required by various functions here  
deferred until after the result page is displayed to the user. For
+
can be deferred until after the result page is displayed to the  
example, updating the view counts, updating the linked-to tables after
+
user. For example, updating the view counts, updating the  
a save, etc. PHP does not yet have any way to tell the server to
+
linked-to tables after a save, etc. PHP does not yet have any  
actually return and disconnect while still running these updates (as a
+
way to tell the server to actually return and disconnect while  
Java servelet could), but it might have such a feature in the future.
+
still running these updates (as a Java servelet could), but it  
We handle these by creating a deferred-update object (in a real O-O
+
might have such a feature in the future.  
language these would be classes that implement an interface) and
+
putting those objects on a global list, then executing the whole list
+
We handle these by creating a deferred-update object (in a real  
after the page is displayed. We don't do anything smart like collating
+
O-O language these would be classes that implement an interface)  
updates to the same table or such because the list is almost always
+
and putting those objects on a global list, then executing the  
going to have just one item on it, if that, so it's not worth the
+
whole list after the page is displayed. We don't do anything  
trouble.
+
smart like collating updates to the same table or such because  
 +
the list is almost always going to have just one item on it, if  
 +
that, so it's not worth the trouble.
 
==Edit Log==
 
==Edit Log==
 
*'''2005-06-13''' Transcribed from docs for MediaWiki version 1.4.5
 
*'''2005-06-13''' Transcribed from docs for MediaWiki version 1.4.5

Revision as of 12:51, 13 June 2005

Techniques: Software: MediaWiki: Developer Documents: Deferred.doc

Contents

A few of the database updates required by various functions here can be deferred until after the result page is displayed to the user. For example, updating the view counts, updating the linked-to tables after a save, etc. PHP does not yet have any way to tell the server to actually return and disconnect while still running these updates (as a Java servelet could), but it might have such a feature in the future.

We handle these by creating a deferred-update object (in a real O-O language these would be classes that implement an interface) and putting those objects on a global list, then executing the whole list after the page is displayed. We don't do anything smart like collating updates to the same table or such because the list is almost always going to have just one item on it, if that, so it's not worth the trouble.

Edit Log

  • 2005-06-13 Transcribed from docs for MediaWiki version 1.4.5