For testcases, see /tests.

Exchange modules

I'm moving the discussion from various places to here so we have an easy way to track what's happened so far:

  • Exchange data will be converted to lua modules to improve performance, both in terms of normal page loads and in calculators. In the case of the latter, Quarenon's calc script passes a template through the API via action=parse which can cause a noticeable delay with complicated exchange data. Hopefully this conversion will alleviate this.
  • A script for converting data in exchange pages to modules has been written and can be deployed when suitable.
  • The format for exchange modules can be found here, the format for it's data subpage can be found here.
  • With regards to exchange related js:
    • MediaWiki:Common.js/gemwupdate.js has been updated and has the ability to update exchange modules. This functionality is currently commented out, but has been marked as for post-lua conversion.
    • MediaWiki:Common.js/GECharts.js has had the ability to pull data from modules added. As with the above script, this functionality is currently commented out but labelled appropriately.
  • Exchange related abusefilters (such as ns protection) will need updating, however this should be quick and straightforward.

The update process will be run after TyBot has completed updating all exchange data after the GED updates, making sure it has the current data. From this point onwards, the various templates will be moved to using the data in modules. I'm hoping this won't take longer than a week, but there may be unforeseen errors during this transition that extend this period. This change will not be introducing any major changes: almost all templates output exactly the same as they do currently. A few will be deleted as they become obsolete.

Obviously, both module and exchange namespace pages to be updated during the transition. TyBot is currently being rewritten in java, when it's new code is stable I'm hoping to start the move.

Some things I haven't worked out yet:

  • What should be done with the current /Data pages in the exchange namespace post conversion? They cease to be useful as data storage, and all they do that the main exchange pages don't is have a slightly less cluttered space for the graph.
  • Should the main exchange pages be retired? It could be phased out in favour of a different interface elsewhere, possibly another subpage of GEMW.


I think we could probs just delete the /Data pages if they have no real use. Maybe provide a way to make the graph bigger in the main exchange page if the larger graph is a popular thing. If we decide to keep them, maybe rename them to /Graph? User:TyA/sig 01:53, November 28, 2014 (UTC)
I agree with Ty. The /Data subpages can be deleted. All data can be ported over to the Module namespace.
If exchange pages are phased out and retained as subpages in mainspace, wouldn't that increase page count in mainspace? I don't think that would be a good idea, since these are not really articles, per se.
If they are retained as exchange pages, how would they co-exist with their Module counterparts? Do they need to be maintained as well? Not updated daily with prices (since these pages only contain the Invoke thing), but more like renaming, moving, deleting, etc... when items are introduced/renamed/removed?
Categories can only be added in the Exchange namespace (and not the Module namespace AFAIK), so maintenance (and categorisation) can be quite difficult if the Exchange pages are retired... User:Azliq7 02:43, November 28, 2014 (UTC)
An example would be: Grand Exchange Market Watch/Alchemy. It relies on a category to work, Category:Profitable Alchemy Items. But it also takes a long time to load... so I don't know if this page takes even longer to load after we move over to Modules. User:Azliq7 02:56, November 28, 2014 (UTC)
I'm not a fan of them being moved to the mainspace, I was thinking of something similar to GEMW/C with extra data loaded/displayed as required but without having a vastly inflated page count. There's a few issues with the charts script that I didn't get around to fixing, so I could add some extra features when I get some time to fix those.
For the time being I think we're going to have to maintain exchange pages alongside their module counterparts, if only so we don't break links all over the wiki. Long term we could move the categories and data displayed on exchange pages to their mainspace counterparts. With this move we do lose the ability to detect modules with incorrect item names (or for items that don't exist), but we could periodically tag these if it becomes an issue. Modules can be categorised, but it's like categorising js pages: it feels odd.
The alchemy page should have some improvement in page load, in my tests various things were being updated much faster without purging the exchange page such as categories and the notice for when they were last updated.
I've added abusefilters to the list of things to do above, but that should be a simple task to complete. User:Cqm/Signature

As of today, Cqm has created module pages for all of the exchange items and TyBot is currently updating both. User:TyA/sig 03:21, December 29, 2014 (UTC)

Community content is available under CC-BY-SA unless otherwise noted.