• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

wikimedia / restbase / 931
84%

Build:
DEFAULT BRANCH: master
Ran 26 Mar 2015 12:29AM UTC
Jobs 3
Files 9
Run time 2min
Badge
Embed ▾
README BADGES
x

If you need to use a raster PNG badge, change the '.svg' to '.png' in the link

Markdown

Textile

RDoc

HTML

Rst

pending completion
931

Pull #220

travis-ci

gwicke
Don't store a new render if the content did not change

This patch processes a no-cache update request for a parsoid content revision
by letting Parsoid parse the page as usual. However, instead of blindly
storing the new render, we now compare the content with the previous render's
content & don't store a new revision if nothing changed. The hope is that this
will reduce our storage requirements from template updates significantly,
assuming that many template-triggered re-renders don't actually change the
content. A statsd counter is set up to track the effectiveness of this
optimization.

Since Parsoid currently emits non-deterministic about attributes (see link to
task), we need to perform some slightly hacky HTML normalization to avoid
marking all HTML pages as differing. This hack should be removed once the
Parsoid bug is fixed.

I also used the opportunity to clean up a few things in the parsoid module:

- Move the method setup to the mod constructor. This makes those methods
  available to the module itself without going through routing. Also removed
  the factory function in favor of simple currying / bind.

- Create a new uuid directly in generateAndSave instead of passing it in from
  all users.

The tests have been updated to use a simpler and thus more reliable set of
pages to test changing vs. unchanging re-renders. A timestamp parser function
is used to force updates in one of the pages.

Bug: https://phabricator.wikimedia.org/T93779
Pull Request #220: Don't store a new render if the content did not change

54 of 54 new or added lines in 3 files covered. (100.0%)

786 of 910 relevant lines covered (86.37%)

124.0 hits per line

New Missed Lines in Diff

Lines Coverage ∆ File
3
100.0
mods/parsoid.js
6
100.0
lib/server.js

Uncovered Existing Lines

Lines Coverage ∆ File
1
100.0
lib/server.js
6
100.0
mods/parsoid.js
Jobs
ID Job ID Ran Files Coverage
1 931.1 26 Mar 2015 12:30AM UTC 0
86.37
Travis Job 931.1
2 931.2 26 Mar 2015 12:30AM UTC 0
86.37
Travis Job 931.2
3 931.3 26 Mar 2015 12:28AM UTC 0
86.37
Travis Job 931.3
Source Files on build 931
Detailed source file information is not available for this build.
  • Back to Repo
  • Travis Build #931
  • Pull Request #220
  • PR Base - master (#928)
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2026 Coveralls, Inc