Aaron Schulz has uploaded a new change for review. https://gerrit.wikimedia.org/r/119342
Change subject: Added a __sleep() method to ParserOutput to exclude cruft ...................................................................... Added a __sleep() method to ParserOutput to exclude cruft Change-Id: I1a3c45288bf8b29c27277a3e70362ddc36713538 --- M includes/parser/ParserOutput.php 1 file changed, 15 insertions(+), 3 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/core refs/changes/42/119342/1 diff --git a/includes/parser/ParserOutput.php b/includes/parser/ParserOutput.php index b2c9757..d1e3e58 100644 --- a/includes/parser/ParserOutput.php +++ b/includes/parser/ParserOutput.php @@ -418,7 +418,7 @@ * @note: Do not use setProperty() to set a property which is only used * in a context where the ParserOutput object itself is already available, * for example a normal page view. There is no need to save such a property - * in the database since it the text is already parsed. You can just hook + * in the database since the text is already parsed. You can just hook * OutputPageParserOutput and get your data out of the ParserOutput object. * * If you are writing an extension where you want to set a property in the @@ -488,8 +488,10 @@ } /** - * Adds an update job to the output. Any update jobs added to the output will eventually bexecuted in order to - * store any secondary information extracted from the page's content. + * Adds an update job to the output. Any update jobs added to the output will + * eventually be executed in order to store any secondary information extracted + * from the page's content. This is triggered by calling getSecondaryDataUpdates() + * and is used for forward links updates on edit and backlink updates by jobs. * * @since 1.20 * @@ -656,4 +658,14 @@ function setLimitReportData( $key, $value ) { $this->mLimitReportData[$key] = $value; } + + /** + * Save space for for serialization by removing useless values + */ + function __sleep() { + return array_diff( + array_keys( get_object_vars( $this ) ), + array( 'mSecondaryDataUpdates', 'mParseStartTime' ) + ); + } } -- To view, visit https://gerrit.wikimedia.org/r/119342 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I1a3c45288bf8b29c27277a3e70362ddc36713538 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/core Gerrit-Branch: master Gerrit-Owner: Aaron Schulz <asch...@wikimedia.org> _______________________________________________ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits