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

wikimedia / mediawiki-extensions-SemanticMediaWiki / 209
28%

Build:
DEFAULT BRANCH: master
Ran 19 Sep 2013 03:05AM UTC
Jobs 1
Files 209
Run time –
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
209

push

travis-ci

mwjames
\SMW\Factbox + \SMW\FactboxPresenter

Factbox logic has not been altered (aside from making the
interface somewhat sane) but as part of the process to improve
testability several functions that were tightly coupled with
hook execution have been moved into seperate classes to keep
diluting of responsibilities at a minimum. The current split is
following:

SMW\Factbox
Code coverage: 100%
CRAP: 32 (before 78.46)

SMW\FactboxPresenter
Code coverage: 100%
CRAP: 18

SMW\OutputPageParserOutput
Test coverage: 100%
CRAP: 5

SMW\SkinAfterContent
Test coverage: 100%
CRAP: 3

## Narative

+ Move to SMW\Factbox
+ Eliminate all static methods
+ Re-group code for readability
+ Move hook related code
+ Table formatting has been moved to an extra TableFormatter class to
decouple data capturing from formatting

+ Introduces smwgFactboxUseCache in order for onOutputPageParserOutput()
to fetch factbox text from cache instead of regenerating content on each
page request. If smwgFactboxUseCache = true only after a page received a new
revision (after it is saved) the factbox content will be re-parsed.
This enables pages to serve content faster, consume less memory and
work more efficient.

The Profiler showed two issues when executing onOutputPageParserOutput()
without cache, depending on how many properties/values are assigned it
takes considerable amount of time identifying properties/values
plus the additional text parsing that is needed to convert the text
into an output representation.

Name                                         Calls         Total          Each             %       Mem

Non-cached
SMWHooks::onOutputPageParserOutput                1       461.743       461.743         9.946%    184492  (      461.743 -      461.743) [872]
Parser::parse-SMWHooks::onOutputPageParserOutput  1       374.598       374.598         8.069%     57957  (      374.598 -      374.598) [806]

Cached
SMWHooks::onOutputPageParserOutput                1        27.051        27.051         0.859%    168323  (       27.051 -       27.051) [2]

Using the cache also shields against the loss of data attached to the
outputpage object which is responsible that on some occasions the factbox
disappears and only after a page purge (as the data are re-attached to
the outputpage) appears again.

+ Introduces smwgFactboxCacheRefreshOnPurge which will force the cache
to be purged after an action=purge event otherwise only a save
event will invalidate  the factbox cache object.

## Bugs

Bug: 23185 ought to be solved by using Sanitizer::removeHTMLtags for
some tags that can lead to a breakage

Bug: 38809 In cases where factbox content could not be retrieved
from the output object use the real cache to find an appropriate
content

Change-Id: I5eb8a3e64

2932 of 14901 relevant lines covered (19.68%)

1.61 hits per line

Jobs
ID Job ID Ran Files Coverage
1 209.1 (DBTYPE=mysql; MW=master) 19 Sep 2013 02:55AM UTC 0
19.68
Travis Job 209.1
Source Files on build 209
Detailed source file information is not available for this build.
  • Back to Repo
  • Travis Build #209
  • 5a82da83 on github
  • Prev Build on master (#208)
  • Next Build on master (#210)
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