Last modified: 2013-08-27 17:20:31 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 T55407, the corresponding Phabricator task for complete and up-to-date bug report information.
Bug 53407 - Compressed HTML size isn't recorded for some pages
Compressed HTML size isn't recorded for some pages
Status: RESOLVED FIXED
Product: Parsoid
Classification: Unclassified
tests (Other open bugs)
unspecified
All All
: Unprioritized normal
: ---
Assigned To: Marc Ordinas i Llopis
:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2013-08-27 15:49 UTC by Marc Ordinas i Llopis
Modified: 2013-08-27 17:20 UTC (History)
1 user (show)

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


Attachments

Description Marc Ordinas i Llopis 2013-08-27 15:49:44 UTC
For some pages, the size of the gzipped HTML is not recorded and sent to the server.

The problem seems to happen because the compression doesn't finish before the rest of the testing, thus the callback where the compressed size is recorded (at roundtrip-tests.js:456) isn't called before sending the test results to the server. This is consistent with the bug appearing more often for pages that don't have any errors, making their roudTripDiff really fast.

I've tried fixing it by putting the rest of the testing inside the callback for zlib.gzip, and although that ensures that the gzipped HTML is recorded, the rest of the testing gives very strange results. Looking at the document at that point shows that it somehow gets reverted to 'about:blank' and its outerHTML is similar to

<html prefix="dc: http://purl.org/dc/terms/ mw: http://mediawiki.org/rdf/" about="http://en.wikipedia.org/wiki/Special:Redirect/revision/175035273"><head></head><body data-parsoid="{}"><meta typeof="mw:StartTag" data-stag="body:undefined"></body></html>

thus making the size of the serialized DOM the same for all pages.

Another possibility was moving the zipping to roundTripDiff, but that was even weirder: xmlCallback was invoked multiple times until somehow the environment became null.

Any help or pointers will be greatly appreciated.
Comment 1 Gerrit Notification Bot 2013-08-27 16:44:37 UTC
Change 81251 had a related patch set uploaded by GWicke:
Don't modify the document after parsing

https://gerrit.wikimedia.org/r/81251
Comment 2 Gerrit Notification Bot 2013-08-27 17:20:03 UTC
Change 81251 merged by jenkins-bot:
Bug 53407: Don't modify the document after parsing

https://gerrit.wikimedia.org/r/81251

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


Navigation
Links