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

Wikimedia Bugzilla is closed!

Wikimedia has migrated from Bugzilla to Phabricator. Bug reports should be created and updated in Wikimedia Phabricator instead. Please create an account in Phabricator and add your Bugzilla email address to it.
Wikimedia Bugzilla is read-only. If you try to edit or create any bug report in Bugzilla you will be shown an intentional error message.
In order to access the Phabricator task corresponding to a Bugzilla report, just remove "static-" from its URL.
You could still run searches in Bugzilla or access your list of votes but bug reports will obviously not be up-to-date in Bugzilla.
Bug 9974 - Semantic Mediawiki extension increases pages load time
Semantic Mediawiki extension increases pages load time
Product: MediaWiki extensions
Classification: Unclassified
Semantic MediaWiki (Other open bugs)
All All
: High normal (vote)
: ---
Assigned To: Markus Krötzsch
Depends on:
  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: ---

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

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, 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.