Page MenuHomePhabricator

Compressed HTML size isn't recorded for some pages
Closed, ResolvedPublic

Description

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.


Version: unspecified
Severity: normal

Details

Reference
bz53407

Event Timeline

bzimport raised the priority of this task from to Needs Triage.Nov 22 2014, 1:53 AM
bzimport added a project: Parsoid-Tests.
bzimport set Reference to bz53407.

Change 81251 had a related patch set uploaded by GWicke:
Don't modify the document after parsing

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

Change 81251 merged by jenkins-bot:
Bug 53407: Don't modify the document after parsing

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