As a technical contributor, I want to see an accurate count of Wikibase entities accessed to assess the page based on the parser performance report.
Problem:
In the parser performance report, the count resets to zero when it reaches the maximum limit (400) and begins a new count which only reports the number after the reset. E.g. if there are 411 entities, it would report only 11.
Example:
BDD
GIVEN user navigates to a page with more than 400 wikidata entity accesses (e.g. very kind sandbox example.)
- User sees the Lua error message: Too many Wikidata entities accessed.
- User can confirm that there lots of wikidata entities cited in the page (in this example, Wolff's Revier (Q566440) has 464 cast members (P161).)
- User navigates to the NewPP limit report in the page source, and sees Number of Wikibase entities loaded: 0/400
As the page attempts to access the first 400 cast members of Wolff's Revier , we can see that the 0 count is incorrect. It has been reset after issuing the Lua error.
Acceptance criteria:
When a user has access more than 400 Wikidata entities in one page, the count is not reset and shows in the NewPP limit report the real number out of 400.
Important Notes
- Risks identified: If we make the count operate correctly, it means that after the limit has been extended, there will be no reset and attempts to access an entity will cause an error.
- In cases where we have a single call that tries to access more than 400 entities e.g. inflows of the pacific ocean, they are valid additions to the count of entities access even if the page shows an error instead of the entity and we believe very few pages have more than 400 Wikibase entities accessed.
However, we do not expect there will be many new errors after the fix, this is because if the page does exceed the entity accessed limit, it would already show an existing error.
Notes about entity properties
We previously believed that statement values are not represented in the count when the values are also Wikibase entities.
However, we found out that whether the entity is included in the count depends on how the entities are being accessed.
In the implementation where we are using the template from user @Strainu {{Listă de la Wikidata/test|pid=P6|qid=Q1}}, each of the values of the property (P6) are being checked for its statements ("a list (P2354)" or is "coextensive with (P3403)"), this is considered accessing the entity. Therefore, this is correct to include in the entity access count. However, in the implementation where we directly access a property at an entity {{ #property: P6 | from = Q1}}, the property values are not being checked for their statements. That is why these entity statements are not represented in the count.
We feel that there is no work required in changing what's considered as an entity accessed.
Currently Affected Pages
- Tour de Berna
- Küneş
- Папуа — Çĕнĕ Гвиней
- Alpecin-Deceuninck
- UAE Team Emirates
- Team Visma-Lease a Bike
- Laghi del Trentino
- Campeonatos nacionais de ciclismo em estrada de 2019'
--Previous description--
This page (using this version of Infocaseta film and this version of Modul:Wikidata) throws a "Too many Wikidata entities accessed" because the P161 (distribution) property at Wikidata has hundreds of items and the Infobox tries to access them all.
While the error is correct, when checking the parser data in preview, I see "Number of Wikibase entities loaded 9/400", which is confusing. I believe there are 2 improvements than can be made:
- in the error message, explicitly mention the limit and the current value
- correctly report the number in the parser performance data