Hi James,
That function checks, for every red link on the page, whether there's a
property somewhere on the wiki pointing to that page, that has a form
associated with it - and if there is, setBrokenLink() changes the URL of
that red link to look like "Special:FormEdit/form-name/page-name" - so that
users can create the page directly with a form. So there are valid reasons
for the function to be called in special pages as well.
However, it can be a drag on performance. There's a setting you can use,
$sfgRedLinksCheckOnlyLocalProps, that, if you set it to true, makes it so
that setBrokenLink() checks only the properties defined on this page,
instead of all properties across the wiki. It makes the whole thing less
effective, but it should reduce the running time considerably.
-Yaron
On Thu, Sep 19, 2013 at 1:35 PM, James HK <jamesin.hongkon...@gmail.com>wrote:
> Hi,
>
> I run a Xdebug trace on the SMW\PropertiesQueryPage (SMW 1.9) and
> somehow the SFFormLinker::setBrokenLink through the DummyLinker took
> up to 700ms to finalize a request.
>
> Xdebug trace:
> SMW\PropertiesQueryPage->getUserDefinedPropertyInfo [1] calls
> DummyLinker->Link which calls Linker->link which looks for registered
> Hooks, finding SFFormLinker::setBrokenLink.
>
> SFFormLinker::setBrokenLink took up to 700 ms to return to the
> DummyLinker request which is nearly 80% of the processing time of the
> SMW\PropertiesQueryPage->getUserDefinedPropertyInfo.
>
> Since SFFormLinker::setBrokenLink is being hooked to the Linker object
> it means that each time a Linker object is requested (for the above
> trace it was called 128 times) SFFormLinker::setBrokenLink runs as
> well.
>
> Some clarification as what SFFormLinker::setBrokenLink is doing and if
> it is really necessary to have it run for each Linker/DummyLinker
> request (can't image as to why a SpecialPage (SMW\PropertiesQueryPage
> which is called by SMW\Properties) requires SFFormLinker to run at
> all).
>
> [1]
> https://github.com/wikimedia/mediawiki-extensions-SemanticMediaWiki/blob/master/includes/querypages/PropertiesQueryPage.php#L208
>
> Test system:
>
> Semantic MediaWiki (Version 1.9 alpha-3) (63d2188)
> Semantic Forms (Version 2.5.2) (3b21574)
> MediaWiki 1.22alpha (ae44cfb)
> PHP 5.4.7 (apache2handler)
> MySQL 5.5.27
>
> Cheers
>
>
> ------------------------------------------------------------------------------
> LIMITED TIME SALE - Full Year of Microsoft Training For Just $49.99!
> 1,500+ hours of tutorials including VisualStudio 2012, Windows 8,
> SharePoint
> 2013, SQL 2012, MVC 4, more. BEST VALUE: New Multi-Library Power Pack
> includes
> Mobile, Cloud, Java, and UX Design. Lowest price ever! Ends 9/20/13.
> http://pubads.g.doubleclick.net/gampad/clk?id=58041151&iu=/4140/ostg.clktrk
> _______________________________________________
> Semediawiki-devel mailing list
> Semediawiki-devel@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/semediawiki-devel
>
--
WikiWorks · MediaWiki Consulting · http://wikiworks.com
------------------------------------------------------------------------------
LIMITED TIME SALE - Full Year of Microsoft Training For Just $49.99!
1,500+ hours of tutorials including VisualStudio 2012, Windows 8, SharePoint
2013, SQL 2012, MVC 4, more. BEST VALUE: New Multi-Library Power Pack includes
Mobile, Cloud, Java, and UX Design. Lowest price ever! Ends 9/20/13.
http://pubads.g.doubleclick.net/gampad/clk?id=58041151&iu=/4140/ostg.clktrk
_______________________________________________
Semediawiki-devel mailing list
Semediawiki-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/semediawiki-devel