|
Ran
|
Jobs
4
|
Files
86
|
Run time
5min
|
Badge
README BADGES
|
push
travis-ci
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
| ID | Job ID | Ran | Files | Coverage | |
|---|---|---|---|---|---|
| 1 | 1818.1 | 0 |
86.07 |
Travis Job 1818.1 | |
| 2 | 1818.2 | 0 |
86.08 |
Travis Job 1818.2 | |
| 3 | 1818.3 | 0 |
86.08 |
Travis Job 1818.3 | |
| 4 | 1818.4 | 0 |
86.08 |
Travis Job 1818.4 |