Skip to content

Commit

Permalink
Speed up page rendering
Browse files Browse the repository at this point in the history
Roughly doubles the speed when serving from warm caches.
  • Loading branch information
rjackson committed Oct 16, 2020
1 parent 73261d7 commit a98be18
Show file tree
Hide file tree
Showing 4 changed files with 17 additions and 1 deletion.
3 changes: 3 additions & 0 deletions .gitmodules
Original file line number Diff line number Diff line change
Expand Up @@ -31,3 +31,6 @@
[submodule "src/extensions/Nuke"]
path = src/extensions/Nuke
url = git@github.com:wikimedia/mediawiki-extensions-Nuke.git
[submodule "ext/luasandbox"]
path = ext/luasandbox
url = https://gerrit.wikimedia.org/r/mediawiki/php/luasandbox.git
12 changes: 12 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,18 @@ RUN composer install --no-dev --working-dir=/var/www/html/w/extensions/CheckUser
RUN composer install --no-dev --working-dir=/var/www/html/w/extensions/Echo
RUN composer install --no-dev --working-dir=/var/www/html/w/extensions/Flow

# Better Scribunto (lua) performance, apparently
COPY ext/luasandbox /opt/luasandbox
RUN apt-get update && apt-get install -y liblua5.1-0-dev
RUN ( \
cd /opt/luasandbox; \
phpize; \
./configure; \
make; \
make install \
)
RUN docker-php-ext-enable luasandbox

# Generate config at runtime
COPY scripts/configure-mediawiki.sh /usr/local/bin/configure-mediawiki
COPY scripts/configure-blackfire.sh /usr/local/bin/configure-blackfire
Expand Down
2 changes: 1 addition & 1 deletion configs/LocalSettings.php
Original file line number Diff line number Diff line change
Expand Up @@ -388,7 +388,7 @@

# Scribunto extension for running lua code on wiki -- Moussekateer 16/11/13
wfLoadExtension( 'Scribunto' );
$wgScribuntoDefaultEngine = 'luastandalone';
$wgScribuntoDefaultEngine = 'luasandbox';

# CodeEditor extension for more featured editor for code pages -- Moussekateer 16/11/13
wfLoadExtension( 'CodeEditor' );
Expand Down
1 change: 1 addition & 0 deletions ext/luasandbox
Submodule luasandbox added at de5067

0 comments on commit a98be18

Please sign in to comment.