Board Thread:Lua Help/@comment-3134670-20160316163541/@comment-24473195-20160316192031

Well, another important point is that wiki pages are not databases. Initially I also attempted all manner of hacks to put code or variables in pages, and my conclusion was that it is a very poor way of creating templates.

Currently, due to limitations in MediaWiki, and wikia, I tend to think of a page as a frontend, and Lua as the backend / database / storage.

Separating the content in dozens of data modules is much better than having it all stuck into a page. Also, each storing it in lua modules means that you can easily reuse the data in other pages, without the need of transclusions.

In addition, the mw.loadData is much more efficient than a call, because it only loads the table once per page, while a template will reload the thing as many times as the parser limiter allows.