On 13.01.2014 18:17, Pavel Astakhov wrote:
I implemented something similar before Scribunto was stable enough
and > deployed My idea is different
I know. But the interpreting probably is too slow for huge-load wikis.
Do not allow Foxway extension to deceive you. It is a cheap intermediary, between functions of PHP and extensions written in PHP. It understands and executes the commands as PHP code(no more of this). This allows you get the data from a extension, process these data in functions of pure PHP and transmit it to other extension. Yes, there is an additional expense, but they are small.
When you can (albeit slowly) to manage the fast and strong extensions and use powerfull functions in an arbitrary way, you can do anything you like and it will be quickly. You do not pay much, but you have the ability to easily manage this.
Imagine such pages created by Wikipedia users. They can slow down, bring down or exploit the wiki via calling extensions directly. While English Wikipedia is one of the top sites in the world.
... Lua VM also was a bit faster than both PHP and Python some year ago.
I know this, but If we rewrite MediaWiki in LUA, it will not work faster.
Maybe a bit faster, but their point is different - they run Lua in controlled almost isolated environment (users cannot hack Wiki), while it's much harder to achieve that with PHP without interpretation. While PHP interpretation is probably too slow for high-load and huge English Wikipedia. They also a non-profit thus probably cannot buy as many servers as let's say Facebook or Google. So, reducing CPU load it's important to them. Dmitriy