Last modified: 2007-10-02 09:47:22 UTC

Wikimedia Bugzilla is closed!

Wikimedia migrated from Bugzilla to Phabricator. Bug reports are handled in Wikimedia Phabricator.
This static website is read-only and for historical purposes. It is not possible to log in and except for displaying bug reports and their history, links might be broken. See T11974, the corresponding Phabricator task for complete and up-to-date bug report information.
Bug 9974 - Semantic Mediawiki extension increases pages load time
Semantic Mediawiki extension increases pages load time
Status: RESOLVED FIXED
Product: MediaWiki extensions
Classification: Unclassified
Semantic MediaWiki (Other open bugs)
unspecified
All All
: High normal (vote)
: ---
Assigned To: Markus Krötzsch
:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2007-05-20 07:31 UTC by Ittay Dror
Modified: 2007-10-02 09:47 UTC (History)
1 user (show)

See Also:
Web browser: ---
Mobile Platform: ---
Assignee Huggle Beta Tester: ---


Attachments
patch to cache headers in mediawiki 0.10 (6.41 KB, patch)
2007-06-04 12:13 UTC, Ittay Dror
Details

Description Ittay Dror 2007-05-20 07:31:51 UTC
The extension adds many scripts and css references for all pages, even those that don't use any of its features. Although they are cached at the client, it must revalidate them on every load, which causes many connections to be opened.

As a suggestion, http://jimbojw.com/wiki/index.php?title=Doing_more_with_MediaWiki_parser_extensions can be used (for mediawiki versions prior to 0.10)
Comment 1 Markus Krötzsch 2007-06-04 12:04:41 UTC
The suggested method could indeed be used to limit the usage of the timeline, sorting and tooltip scripts on pages that do not require them. I did not perceive that loading this data could take longer than doing an extra parsing of HTML output on each request. 

A core architectural problem of MediaWiki is that the parser cache, while storing many things besides HTML output, cannot hold additional data provided by extensions. Hence the only (and rather unclean method) is to embed data into HTML and to parse this data afterwards. This is also why SMW's Factbox uses only the wiki-language, not the user's language as in the case of the category box.
Comment 2 Ittay Dror 2007-06-04 12:13:40 UTC
Created attachment 3711 [details]
patch to cache headers in mediawiki 0.10

this patch is my change to the code so header items are added only when needed, using mw 0.10 mechanism for caching them. it works for me.
Comment 3 Markus Krötzsch 2007-06-04 15:07:47 UTC
Great. We will incorporate this patch into SMW in time. Since it affects the query processing/printing mechanism which I am currently rewriting, this change will be delayed until this current rewrite is finished.
Comment 4 Markus Krötzsch 2007-08-19 15:56:50 UTC
The increased load times are not only caused by Javascripts, but also by the "clean" programming style of including required PHP files on the top of each file. In this way, most of SMW is loaded on every request. This was changed now in SVN to have only required PHP code being loaded, and this already brings major speed-ups for accessing many pages. Of course the Javascript issue is not forgotten and will also be fixed before the next release.
Comment 5 Markus Krötzsch 2007-10-02 09:47:22 UTC
OK, loading of scripts and CSS now is happening on-demand only (SVN version). Some scripts still can be simplified (they have some ugly dependencies), but many pages should already have far less stuff in their headers. After upgrade, LocalSettings.php should be touched or modified, so that the parser cache is cleared (otherwise some pages may lack scripts).

Note You need to log in before you can comment on or make changes to this bug.


Navigation
Links