Last modified: 2013-07-24 13:08:24 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 12590 - Timeline: too many requests for components
Timeline: too many requests for components
Status: NEW
Product: MediaWiki extensions
Classification: Unclassified
SemanticResultFormats (Other open bugs)
unspecified
All All
: Normal minor (vote)
: ---
Assigned To: Markus Krötzsch
: patch, patch-need-review
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2008-01-11 22:04 UTC by Sergey Chernyshev
Modified: 2013-07-24 13:08 UTC (History)
1 user (show)

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


Attachments
Tarball with combined JS (also minified) and CSS, plus old JS and combined JS (in pre-minified state) (46.06 KB, application/octet-stream)
2008-01-11 22:06 UTC, Sergey Chernyshev
Details
A set of scripts to compress timeline code (2.98 KB, application/x-gtar)
2008-02-06 15:47 UTC, Sergey Chernyshev
Details

Description Sergey Chernyshev 2008-01-11 22:04:16 UTC
As I reported on the dev list earlier, SIMILE Timeline code was carried over as many files instead of the bundle (not sure if they added the bundle later then it was initially used).

Long term solution would be to incorporate their code as is separating all SMW specific code into SMW_timeline.js (or something like that) and have some one-line switch within JS or PHP configuration option to switch between easy to debug multi-file option and much faster bundled version.

As I remember Markus was going to ask people at SAIL to help with this.


Meanwhile, I made a simple workaround by just combining most of JS and CSS code for timeline (and minifying JS).

The result is one timeline-api.js (plus two for i10n which I didn't want to dig into) and one timeline.css both residing in skins/SimileTimeline/ folder. I renamed original timeline-api.js into timeline-api-debug.js and called combined, but uncompressed version timeline-api-uncompressed.js.

For minifying JS code, I used Douglas Crockford's JSmin (http://javascript.crockford.com/jsmin.html) as least intrusive minifier (later, I might re-minify it with YUI Compressor - http://developer.yahoo.com/yui/compressor/ which is supposed to be better and even less intrusive).

The resulting code is just 4 HTTP requests (which can potentially be converted to 2 if i10n code will be merged into main body of code) instead of 23 requests and just 25K (if gzipped).

Next step might be a Makefile with shell script to combine all that before checking into SVN, maybe be even combining all SMW's JS and CSS together.
Comment 1 Sergey Chernyshev 2008-01-11 22:06:49 UTC
Created attachment 4533 [details]
Tarball with combined JS (also minified) and CSS, plus old JS and combined JS (in pre-minified state)
Comment 2 Sergey Chernyshev 2008-02-06 15:47:13 UTC
Created attachment 4624 [details]
A set of scripts to compress timeline code

Instead of just providing the code, I wrote a Unix shell script, Makefile and a patch to do the conversion on the fly (uses ruby version of jsmin http://javascript.crockford.com/jsmin for compression - feel free to replace with version in your preferred language).

It must be ungzipped into extensions/SemanticMediaWiki/skins/SimileTimeline folder.

   make compress

will do compression

   make uncompress

will return the original state.
Comment 3 Siebrand Mazeland 2008-08-11 11:05:24 UTC
Re-assign to extension developer for triage/comments.
Comment 4 Sergey Chernyshev 2009-03-02 14:44:44 UTC
Unfortunately, my patch doesn't work on latest version.

I also tried to plug Simile's latest version of the Timeline, but it didn't work as is. I think it's worth switching to their latest version (and link it in SVN - they have bundled code and many code fixes, I believe.

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


Navigation
Links