Closed
Bug 767176
Opened 13 years ago
Closed 5 years ago
kuma/kumascript: Track templates used in rendering a page
Categories
(developer.mozilla.org Graveyard :: KumaScript, enhancement)
developer.mozilla.org Graveyard
KumaScript
Tracking
(Not tracked)
RESOLVED
WONTFIX
People
(Reporter: lorchard, Unassigned)
References
Details
There's currently no decent way to know what templates were used in the course of rendering a page, nor to know on what pages any given template is used. This information could be useful eventually for things like metrics, caching invalidation, and general template debugging.
I did some data spelunking as a one-shot, in bug 714804, on an old export of MindTouch documents. That was cumbersome, expensive, and hard to repeat.
What might be interesting in the future is something like this, using Redis:
* Let KumaScript accumulate an inventory of templates loaded while rendering a page
* Once done rendering:
* Push the inventory of templates into a set indexed by the page path.
* Push the page path into a set indexed by each template name.
Redis should make this very cheap vs using mysql. This would, over time, leave us with sets of templates-by-page and pages-by-template. We could put this info on dashboards, list pages-in-use on template editing pages, list templates-used in diagnostic info on pages, etc.
Reporter | ||
Comment 1•13 years ago
|
||
(Note that this presupposes the availability of a Redis installation for MDN)
Updated•13 years ago
|
Whiteboard: u=user c=wiki s=2012-07-18 p=
Reporter | ||
Comment 2•13 years ago
|
||
FWIW, this is more of a "nice idea" bug than an immediate need. It also requires a lot of IT cooperation, per comment #1. This will spawn sub-bugs and will not get done in a single sprint
Reporter | ||
Updated•13 years ago
|
Whiteboard: u=user c=wiki s=2012-07-18 p= → u=user c=wiki s= p=
Reporter | ||
Comment 3•13 years ago
|
||
Something else: If / when we have an offline queue for building pages, these lists could be handy for scheduling auto-rebuilds of pages that call modified templates as their dependencies.
Also, would be good to track dependencies-of-dependencies. That is, templates which call templates, and trace their path up to documents in need of rebuild.
Reporter | ||
Comment 4•13 years ago
|
||
FWIW, here's an interesting template use case that makes this even more challenging:
https://developer-new.mozilla.org/en-US/docs/Template:InterfaceEntry
That template uses the value of a parameter to decide the name of another template to call at run time.
Comment 5•13 years ago
|
||
Is he just localizing one template in many languages? On Deki, I think we did that by writing one template and checking the locale within that.
Reporter | ||
Comment 6•13 years ago
|
||
(In reply to John Karahalis [:openjck] from comment #5)
> Is he just localizing one template in many languages? On Deki, I think we
> did that by writing one template and checking the locale within that.
No, that template chooses between two templates based on an interface status flag (ie. unfrozen vs frozen). Both of *those* templates are themselves localized in the way you mention
Assignee | ||
Updated•12 years ago
|
Version: Kuma → unspecified
Assignee | ||
Updated•12 years ago
|
Component: Docs Platform → Editing
Updated•12 years ago
|
Priority: -- → P2
Updated•12 years ago
|
Component: Editing → KumaScript
Whiteboard: u=user c=wiki s= p=
Updated•11 years ago
|
Severity: normal → enhancement
Priority: P2 → --
Comment 7•5 years ago
|
||
MDN Web Docs' bug reporting has now moved to GitHub. From now on, please file content bugs at https://github.com/mdn/sprints/issues/ and platform bugs at https://github.com/mdn/kuma/issues/.
Status: NEW → RESOLVED
Closed: 5 years ago
Resolution: --- → WONTFIX
Updated•5 years ago
|
Product: developer.mozilla.org → developer.mozilla.org Graveyard
You need to log in
before you can comment on or make changes to this bug.
Description
•