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

wikimedia / parsoid / 1818
85%

Build:
DEFAULT BRANCH: master
Ran 27 Feb 2018 07:32PM UTC
Jobs 4
Files 86
Run time 5min
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
1818

push

travis-ci

jenkins-bot
Don't process token attributes unnecessarily

* The async flag is false in AttributeTransformManager only when the
  attributes of the token being processed won't get updated or expanded.

* Given that, there is no reason going async and then rebuilding
  new attributes. Based on some logging, I found that > 60% of tokens
  went through buildExpandedAttrs even though ~1% of all tokens
  actually got their attributes updated.

  Accordingly, juggled around some yield/async logic to bypass the
  buildExpandedAttrs method altogether where possible.

* Eliminated unnecessary promise creation from the common case path
  where the attributes come through unchanged. So, I moved back from
  async/yield to promises in AttributeExpander.onToken
  (and TemplateHandler.onTemplate just to be consistent).

* Together, the previous two optimizations lead to significant perf
  improvement.

  On enwiki:Berlin, went from 8.3s -> 8.1s -> 7.9s on my laptop

  parserTests complete faster as well.

* There is another source of inefficiency lurking around still that will be
  addressed later. While the 60% of tokens now bypass buildExpandedAttrs,
  they still go through AttributeTransformManager.process and build a new
  key-value array that is not actually used. It would be useful to skip
  that as well in a subsequent patch.

Change-Id: I2e8d90dcc

8914 of 10955 branches covered (81.37%)

14253 of 16555 relevant lines covered (86.09%)

102048.48 hits per line

Jobs
ID Job ID Ran Files Coverage
1 1818.1 27 Feb 2018 07:37PM UTC 0
86.07
Travis Job 1818.1
2 1818.2 27 Feb 2018 07:35PM UTC 0
86.08
Travis Job 1818.2
3 1818.3 27 Feb 2018 07:33PM UTC 0
86.08
Travis Job 1818.3
4 1818.4 27 Feb 2018 07:32PM UTC 0
86.08
Travis Job 1818.4
Source Files on build 1818
Detailed source file information is not available for this build.
  • Back to Repo
  • Travis Build #1818
  • 0c3abce0 on github
  • Prev Build on master (#1817)
  • Next Build on master (#1819)
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE TRIAL · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2026 Coveralls, Inc