2016-04-17 15:48:03 +00:00
<!DOCTYPE html>
< html dir = "ltr" >
< head >
< meta http-equiv = "content-type" content = "text/html;charset=UTF-8" / >
< title > Options/Scribunto - XOWA< / title >
< link rel = "shortcut icon" href = "https://gnosygnu.github.io/xowa/xowa_logo.png" / >
< link rel = "stylesheet" href = "https://gnosygnu.github.io/xowa/xowa_common.css" type = "text/css" >
2017-01-04 02:15:53 +00:00
2016-04-17 15:48:03 +00:00
< / head >
< body class = "mediawiki ltr sitedir-ltr ns-0 ns-subject skin-vector action-submit vector-animateLayout" spellcheck = "false" >
< div id = "mw-page-base" class = "noprint" > < / div >
< div id = "mw-head-base" class = "noprint" > < / div >
< div id = "content" class = "mw-body" >
< h1 id = "firstHeading" class = "firstHeading" > < span > Options/Scribunto< / span > < / h1 >
< div id = "bodyContent" class = "mw-body-content" >
< div id = "siteSub" > From XOWA: the free, open-source, offline wiki application< / div >
< div id = "contentSub" > < / div >
< div id = "mw-content-text" lang = "en" dir = "ltr" class = "mw-content-ltr" >
2017-01-04 02:15:53 +00:00
< div id = 'xocfg_body' >
2017-03-30 01:18:40 +00:00
<!-- TEXT:err_msg -->
2017-01-04 02:15:53 +00:00
< div id = 'xocfg_err' >
< / div >
2016-04-17 15:48:03 +00:00
< div >
2017-03-30 01:18:40 +00:00
<!-- BTN:info -->
< span class = 'xoimg_btn_x16 xoimg_help_tip' href = 'javascript:void(0)' onclick = 'return xo.cfg_edit.help__toggle_all()' title = 'toggle all help' > < / span > <!-- COMBO:cfg_grps -->
< select id = 'xocfg_nav_select' onchange = 'xo.cfg_edit.select__send(this);' onkeyup = 'xo.cfg_edit.select__by_keypress(event, this);' accesskey = 'l' >
2017-01-04 02:15:53 +00:00
< option value = 'xowa.app.security' >
App - Security
< / option >
< option value = 'xowa.app.startup' >
App - Startup
< / option >
2017-01-09 03:37:12 +00:00
< option value = 'xowa.app.update' >
App - Update
< / option >
2017-01-04 02:15:53 +00:00
< option value = 'xowa.gui.general' >
Gui - General
< / option >
< option value = 'xowa.gui.tabs' >
Gui - Tabs
< / option >
< option value = 'xowa.gui.url_bar' >
Gui - Address bar
< / option >
< option value = 'xowa.gui.menus' >
Gui - Menus
< / option >
< option value = 'xowa.gui.shortcuts' >
Gui - Shortcuts
< / option >
2017-03-30 01:18:40 +00:00
< option value = 'xowa.gui.nightmode' >
Gui - Nightmode
< / option >
2017-01-04 02:15:53 +00:00
< option value = 'xowa.wiki.hdumps' >
Wiki - HTML Databases
< / option >
< option value = 'xowa.wiki.edit' >
Wiki - Editing
< / option >
< option value = 'xowa.bldr.general' >
Import - General
< / option >
< option value = 'xowa.bldr.db' >
Import - Database
< / option >
< option value = 'xowa.bldr.page_sync' >
Import - Page sync
< / option >
< option value = 'xowa.bldr.dansguardian' >
Import - Dansguardian
< / option >
< option value = 'xowa.html.css' >
HTML - CSS
< / option >
< option value = 'xowa.html.page' >
HTML - Page
< / option >
< option value = 'xowa.html.tidy' >
HTML - Tidy
< / option >
< option value = 'xowa.html.scripting' >
HTML - Scripting
< / option >
< option value = 'xowa.files.general' >
Files - General
< / option >
< option value = 'xowa.files.apps' >
Files - Apps
< / option >
< option value = 'xowa.addon.search' >
Addon - Search
< / option >
2017-03-30 01:18:40 +00:00
< option value = 'xowa.addon.fulltext_search' >
Addon - Full-text search
< / option >
2017-01-04 02:15:53 +00:00
< option value = 'xowa.addon.category' >
Addon - Category
< / option >
< option value = 'xowa.addon.http_server' >
Addon - HTTP Server
< / option >
< option value = 'xowa.addon.scribunto' selected = 'selected' >
Addon - Scribunto
< / option >
< option value = 'xowa.addon.math' >
Addon - Math
< / option >
< option value = 'xowa.addon.score' >
Addon - Score
< / option >
< option value = 'xowa.addon.popups' >
Addon - Popups
< / option >
< option value = 'xowa.addon.wikibase' >
Addon - Wikidata
< / option >
< option value = 'xowa.dev.general' >
Dev - General
< / option >
2017-03-30 01:18:40 +00:00
< / select > <!-- LINK:cfg_link -->
< div style = 'float:right;margin:2px 7px;' >
< a id = 'options_lnk' > options link< / a >
< / div >
2017-01-04 02:15:53 +00:00
< / div >
< div id = 'cfg_grps' >
2017-03-30 01:18:40 +00:00
<!-- TEXT:page_help -->
2017-01-04 02:15:53 +00:00
< div >
< p id = 'page_help_para' >
2016-04-17 15:48:03 +00:00
< / p >
2017-01-04 02:15:53 +00:00
< / div >
2016-04-17 15:48:03 +00:00
< h2 >
2017-01-04 02:15:53 +00:00
General
2016-04-17 15:48:03 +00:00
< / h2 >
2017-01-04 02:15:53 +00:00
< div class = "xocfg_row flex_div" >
2017-03-30 01:18:40 +00:00
<!-- BTN:help_item -->
2017-01-04 02:15:53 +00:00
< div class = 'xocfg_itm_help' >
< span class = 'xoimg_btn_x16 xoimg_help_tip' href = 'javascript:void(0)' onclick = 'return xo.help.toggle("xowa.addon.scribunto.enabled")' title = 'view more info' > < / span >
2017-03-30 01:18:40 +00:00
< / div > <!-- TEXT:key -->
2017-01-04 02:15:53 +00:00
< div id = 'xowa.addon.scribunto.enabled__name' class = 'xocfg_itm_name' >
Enabled
2017-03-30 01:18:40 +00:00
< / div > <!-- BTN:undo -->
2017-01-04 02:15:53 +00:00
< div id = 'xowa.addon.scribunto.enabled__undo' data-xocfg-type = 'bool' class = 'xocfg_itm_delete xocfg_itm_hide' >
< span class = 'xoimg_btn_x16 xoimg_list_undo' onclick = 'return xo.cfg_edit.delete__send("xowa.addon.scribunto.enabled")' title = "reset to "y"" > < / span >
2017-03-30 01:18:40 +00:00
< / div > <!-- TEXT:val -->
2017-01-04 02:15:53 +00:00
< div class = 'xocfg_itm_data' >
< input id = "xowa.addon.scribunto.enabled" data-xocfg-key = "xowa.addon.scribunto.enabled" data-xocfg-type = "bool" accesskey = "d" class = "xocfg_data__bool" type = "checkbox" checked = "checked" >
2017-03-30 01:18:40 +00:00
< / div > <!-- HIDDEN:key,ctx -->
< input type = 'hidden' id = 'xowa.addon.scribunto.enabled__key_box' value = 'xowa.addon.scribunto.enabled' > < input type = 'hidden' id = 'xowa.addon.scribunto.enabled__ctx_box' value = 'app' >
< / div > <!-- DIV:help -->
2017-01-04 02:15:53 +00:00
< div id = 'xowa.addon.scribunto.enabled_help_div' class = 'xohelp_div' >
< div id = 'xowa.addon.scribunto.enabled_help_msg' class = 'xohelp_msg' >
< p >
Handles {{#invoke:Module:Module_name|Function_name|Arguments}}
< / p >
2016-04-17 15:48:03 +00:00
< ul >
< li >
2017-01-04 02:15:53 +00:00
< b > checked< / b > to process #invoke statements
2016-04-17 15:48:03 +00:00
< / li >
< li >
2017-01-04 02:15:53 +00:00
< b > unchecked< / b > to render #invoke as text only
2016-04-17 15:48:03 +00:00
< / li >
< / ul >
2017-01-04 02:15:53 +00:00
< / div >
< / div >
< div class = "xocfg_row flex_div" >
2017-03-30 01:18:40 +00:00
<!-- BTN:help_item -->
2017-01-04 02:15:53 +00:00
< div class = 'xocfg_itm_help' >
< span class = 'xoimg_btn_x16 xoimg_help_tip' href = 'javascript:void(0)' onclick = 'return xo.help.toggle("xowa.addon.scribunto.engine")' title = 'view more info' > < / span >
2017-03-30 01:18:40 +00:00
< / div > <!-- TEXT:key -->
2017-01-04 02:15:53 +00:00
< div id = 'xowa.addon.scribunto.engine__name' class = 'xocfg_itm_name' >
Lua engine
2017-03-30 01:18:40 +00:00
< / div > <!-- BTN:undo -->
2017-01-04 02:15:53 +00:00
< div id = 'xowa.addon.scribunto.engine__undo' data-xocfg-type = 'list:xowa.addon.scribunto.engine' class = 'xocfg_itm_delete xocfg_itm_hide' >
< span class = 'xoimg_btn_x16 xoimg_list_undo' onclick = 'return xo.cfg_edit.delete__send("xowa.addon.scribunto.engine")' title = "reset to "luaj"" > < / span >
2017-03-30 01:18:40 +00:00
< / div > <!-- TEXT:val -->
2017-01-04 02:15:53 +00:00
< div class = 'xocfg_itm_data' >
< select id = "xowa.addon.scribunto.engine" data-xocfg-key = "xowa.addon.scribunto.engine" data-xocfg-type = "list:xowa.addon.scribunto.engine" accesskey = "d" class = "xocfg_data__list" size = "2" >
< option value = "luaj" selected = "selected" >
luaj
< / option >
< option value = "lua" >
lua
< / option >
< / select >
2017-03-30 01:18:40 +00:00
< / div > <!-- HIDDEN:key,ctx -->
< input type = 'hidden' id = 'xowa.addon.scribunto.engine__key_box' value = 'xowa.addon.scribunto.engine' > < input type = 'hidden' id = 'xowa.addon.scribunto.engine__ctx_box' value = 'app' >
< / div > <!-- DIV:help -->
2017-01-04 02:15:53 +00:00
< div id = 'xowa.addon.scribunto.engine_help_div' class = 'xohelp_div' >
< div id = 'xowa.addon.scribunto.engine_help_msg' class = 'xohelp_msg' >
< p >
Select lua engine. See < a tabindex = "-1" href = "/wiki/App/Xtn/Mediawiki/Scribunto#Engines" id = "xolnki_29" title = "App/Xtn/Mediawiki/Scribunto" > App/Xtn/Mediawiki/Scribunto#Engines< / a >
< / p >
2016-04-17 15:48:03 +00:00
< ul >
< li >
2017-01-04 02:15:53 +00:00
< b > luaj< / b > : lua code will be processed through the < a tabindex = "-1" href = "http://luaj.org/luaj/README.html" rel = "nofollow" class = "external text" > luaj< / a > jar at /bin/any/java/luaj/.
2016-04-17 15:48:03 +00:00
< / li >
< li >
2017-01-04 02:15:53 +00:00
< b > lua< / b > : lua code will be processed through the < a tabindex = "-1" href = "http://lua.org/about" rel = "nofollow" class = "external text" > lua< / a > binary at /bin/os_name/lua/.
2016-04-17 15:48:03 +00:00
< / li >
2017-01-04 02:15:53 +00:00
< / ul >
< p >
< b > Note for Lua engine users:< / b >
< / p >
2016-04-17 15:48:03 +00:00
< ul >
< li >
2017-01-04 02:15:53 +00:00
< b > executable permissions< / b > : Linux / Mac OS X users may need to grant execute permission to the Lua binary. To ensure proper setup, please do the following:
2016-04-17 15:48:03 +00:00
< ul >
< li >
2017-03-30 01:18:40 +00:00
Open < a tabindex = "-1" href = "/wiki/Diagnostics/Scribunto/All" id = "xolnki_30" title = "Diagnostics/Scribunto/All" > Diagnostics/Scribunto/All< / a >
2016-04-17 15:48:03 +00:00
< / li >
< li >
2017-01-04 02:15:53 +00:00
If the page fails, then see < a tabindex = "-1" href = "/wiki/App/Xtn/Mediawiki/Scribunto#Permissions" id = "xolnki_31" title = "App/Xtn/Mediawiki/Scribunto" > App/Xtn/Mediawiki/Scribunto#Permissions< / a >
2016-04-17 15:48:03 +00:00
< / li >
< / ul >
< / li >
< li >
2017-01-04 02:15:53 +00:00
< b > NTFS partitions< / b > : Linux users with NTFS partitions will need to run a command like the following:
2016-04-17 15:48:03 +00:00
< / li >
< / ul >
< dl >
< dd >
2017-01-04 02:15:53 +00:00
< code > sudo mount -t ntfs -o rw,auto,user,fmask=0022,dmask=0000 /dev/whatever /mnt/whatever< / code >
2016-04-17 15:48:03 +00:00
< / dd >
< dd >
2017-01-04 02:15:53 +00:00
See < a tabindex = "-1" href = "http://askubuntu.com/questions/11840/how-do-i-use-chmod-on-an-ntfs-or-fat32-partition" rel = "nofollow" class = "external free" > http://askubuntu.com/questions/11840/how-do-i-use-chmod-on-an-ntfs-or-fat32-partition< / a > (Thanks to Anselm)
2016-04-17 15:48:03 +00:00
< / dd >
< / dl >
2017-01-04 02:15:53 +00:00
< / div >
< / div >
< h2 >
Lua options
< / h2 >
< div class = "xocfg_row flex_div" >
2017-03-30 01:18:40 +00:00
<!-- BTN:help_item -->
2017-01-04 02:15:53 +00:00
< div class = 'xocfg_itm_help' >
< span class = 'xoimg_btn_x16 xoimg_help_tip' href = 'javascript:void(0)' onclick = 'return xo.help.toggle("xowa.addon.scribunto.lua.cmd")' title = 'view more info' > < / span >
2017-03-30 01:18:40 +00:00
< / div > <!-- TEXT:key -->
2017-01-04 02:15:53 +00:00
< div id = 'xowa.addon.scribunto.lua.cmd__name' class = 'xocfg_itm_name' >
Lua path
2017-03-30 01:18:40 +00:00
< / div > <!-- BTN:undo -->
2017-01-04 02:15:53 +00:00
< div id = 'xowa.addon.scribunto.lua.cmd__undo' data-xocfg-type = 'io.cmd' class = 'xocfg_itm_delete xocfg_itm_hide' >
< span class = 'xoimg_btn_x16 xoimg_list_undo' onclick = 'return xo.cfg_edit.delete__send("xowa.addon.scribunto.lua.cmd")' title = "reset to "~{<>bin_plat_dir<>}lua\lua5.1.exe|"" > < / span >
2017-03-30 01:18:40 +00:00
< / div > <!-- TEXT:val -->
2017-01-04 02:15:53 +00:00
< div class = 'xocfg_itm_data' >
< input class = "xocfg_data__io_cmd__exe__txt" id = "xowa.addon.scribunto.lua.cmd-exe" data-xocfg-key = "xowa.addon.scribunto.lua.cmd" data-xocfg-type = "io.cmd-exe" accesskey = "d" type = "text" value = "~{<>bin_plat_dir<>}lua\lua5.1.exe" > < span class = "xoimg_btn_x16 xoimg_app_configure" onclick = 'xo.cfg_edit.io_cmd__select("file", "xowa.addon.scribunto.lua.cmd-exe", "Please select a file.");' > < / span > < br >
< input class = "xocfg_data__io_cmd__arg__txt" id = "xowa.addon.scribunto.lua.cmd-arg" data-xocfg-key = "xowa.addon.scribunto.lua.cmd" data-xocfg-type = "io.cmd-arg" accesskey = "d" type = "text" value = "" >
2017-03-30 01:18:40 +00:00
< / div > <!-- HIDDEN:key,ctx -->
< input type = 'hidden' id = 'xowa.addon.scribunto.lua.cmd__key_box' value = 'xowa.addon.scribunto.lua.cmd' > < input type = 'hidden' id = 'xowa.addon.scribunto.lua.cmd__ctx_box' value = 'app' >
< / div > <!-- DIV:help -->
2017-01-04 02:15:53 +00:00
< div id = 'xowa.addon.scribunto.lua.cmd_help_div' class = 'xohelp_div' >
< div id = 'xowa.addon.scribunto.lua.cmd_help_msg' class = 'xohelp_msg' >
< p >
Path to Lua binary. Only applies to the < code > lua< / code > engine.
< / p >
< / div >
< / div >
< div class = "xocfg_row flex_div" >
2017-03-30 01:18:40 +00:00
<!-- BTN:help_item -->
2017-01-04 02:15:53 +00:00
< div class = 'xocfg_itm_help' >
< span class = 'xoimg_btn_x16 xoimg_help_tip' href = 'javascript:void(0)' onclick = 'return xo.help.toggle("xowa.addon.scribunto.lua.timeout")' title = 'view more info' > < / span >
2017-03-30 01:18:40 +00:00
< / div > <!-- TEXT:key -->
2017-01-04 02:15:53 +00:00
< div id = 'xowa.addon.scribunto.lua.timeout__name' class = 'xocfg_itm_name' >
Lua timeout
2017-03-30 01:18:40 +00:00
< / div > <!-- BTN:undo -->
2017-01-04 02:15:53 +00:00
< div id = 'xowa.addon.scribunto.lua.timeout__undo' data-xocfg-type = 'int' class = 'xocfg_itm_delete xocfg_itm_hide' >
< span class = 'xoimg_btn_x16 xoimg_list_undo' onclick = 'return xo.cfg_edit.delete__send("xowa.addon.scribunto.lua.timeout")' title = "reset to "4000"" > < / span >
2017-03-30 01:18:40 +00:00
< / div > <!-- TEXT:val -->
2017-01-04 02:15:53 +00:00
< div class = 'xocfg_itm_data' >
< input id = "xowa.addon.scribunto.lua.timeout" data-xocfg-key = "xowa.addon.scribunto.lua.timeout" data-xocfg-type = "int" accesskey = "d" class = "xocfg_data__int" type = "text" value = "4000" >
2017-03-30 01:18:40 +00:00
< / div > <!-- HIDDEN:key,ctx -->
< input type = 'hidden' id = 'xowa.addon.scribunto.lua.timeout__key_box' value = 'xowa.addon.scribunto.lua.timeout' > < input type = 'hidden' id = 'xowa.addon.scribunto.lua.timeout__ctx_box' value = 'app' >
< / div > <!-- DIV:help -->
2017-01-04 02:15:53 +00:00
< div id = 'xowa.addon.scribunto.lua.timeout_help_div' class = 'xohelp_div' >
< div id = 'xowa.addon.scribunto.lua.timeout_help_msg' class = 'xohelp_msg' >
< p >
# of milliseconds before canceling Lua call
< / p >
< / div >
< / div >
< div class = "xocfg_row flex_div" >
2017-03-30 01:18:40 +00:00
<!-- BTN:help_item -->
2017-01-04 02:15:53 +00:00
< div class = 'xocfg_itm_help' >
< span class = 'xoimg_btn_x16 xoimg_help_tip' href = 'javascript:void(0)' onclick = 'return xo.help.toggle("xowa.addon.scribunto.lua.timeout_polling")' title = 'view more info' > < / span >
2017-03-30 01:18:40 +00:00
< / div > <!-- TEXT:key -->
2017-01-04 02:15:53 +00:00
< div id = 'xowa.addon.scribunto.lua.timeout_polling__name' class = 'xocfg_itm_name' >
Lua timeout polling
2017-03-30 01:18:40 +00:00
< / div > <!-- BTN:undo -->
2017-01-04 02:15:53 +00:00
< div id = 'xowa.addon.scribunto.lua.timeout_polling__undo' data-xocfg-type = 'int' class = 'xocfg_itm_delete xocfg_itm_hide' >
< span class = 'xoimg_btn_x16 xoimg_list_undo' onclick = 'return xo.cfg_edit.delete__send("xowa.addon.scribunto.lua.timeout_polling")' title = "reset to "1"" > < / span >
2017-03-30 01:18:40 +00:00
< / div > <!-- TEXT:val -->
2017-01-04 02:15:53 +00:00
< div class = 'xocfg_itm_data' >
< input id = "xowa.addon.scribunto.lua.timeout_polling" data-xocfg-key = "xowa.addon.scribunto.lua.timeout_polling" data-xocfg-type = "int" accesskey = "d" class = "xocfg_data__int" type = "text" value = "1" >
2017-03-30 01:18:40 +00:00
< / div > <!-- HIDDEN:key,ctx -->
< input type = 'hidden' id = 'xowa.addon.scribunto.lua.timeout_polling__key_box' value = 'xowa.addon.scribunto.lua.timeout_polling' > < input type = 'hidden' id = 'xowa.addon.scribunto.lua.timeout_polling__ctx_box' value = 'app' >
< / div > <!-- DIV:help -->
2017-01-04 02:15:53 +00:00
< div id = 'xowa.addon.scribunto.lua.timeout_polling_help_div' class = 'xohelp_div' >
< div id = 'xowa.addon.scribunto.lua.timeout_polling_help_msg' class = 'xohelp_msg' >
< p >
# of milliseconds before checking for timeout. For example, with a timeout of 4000:
< / p >
2016-04-17 15:48:03 +00:00
< dl >
< dd >
2017-01-04 02:15:53 +00:00
A timeout polling of 1 will check roughly 4000 times before timing out.
2016-04-17 15:48:03 +00:00
< / dd >
< dd >
2017-01-04 02:15:53 +00:00
A timeout polling of 1000 will check roughly 4 times before timing out.
2016-04-17 15:48:03 +00:00
< / dd >
2017-01-04 02:15:53 +00:00
< / dl >
< p >
This setting should be left at 1. It is meant to "tweak" certain outlier situations should they arise.
< / p >
< / div >
< / div >
< div class = "xocfg_row flex_div" >
2017-03-30 01:18:40 +00:00
<!-- BTN:help_item -->
2017-01-04 02:15:53 +00:00
< div class = 'xocfg_itm_help' >
< span class = 'xoimg_btn_x16 xoimg_help_tip' href = 'javascript:void(0)' onclick = 'return xo.help.toggle("xowa.addon.scribunto.lua.timeout_busy_wait")' title = 'view more info' > < / span >
2017-03-30 01:18:40 +00:00
< / div > <!-- TEXT:key -->
2017-01-04 02:15:53 +00:00
< div id = 'xowa.addon.scribunto.lua.timeout_busy_wait__name' class = 'xocfg_itm_name' >
Lua timeout busy wait
2017-03-30 01:18:40 +00:00
< / div > <!-- BTN:undo -->
2017-01-04 02:15:53 +00:00
< div id = 'xowa.addon.scribunto.lua.timeout_busy_wait__undo' data-xocfg-type = 'int' class = 'xocfg_itm_delete xocfg_itm_hide' >
< span class = 'xoimg_btn_x16 xoimg_list_undo' onclick = 'return xo.cfg_edit.delete__send("xowa.addon.scribunto.lua.timeout_busy_wait")' title = "reset to "250"" > < / span >
2017-03-30 01:18:40 +00:00
< / div > <!-- TEXT:val -->
2017-01-04 02:15:53 +00:00
< div class = 'xocfg_itm_data' >
< input id = "xowa.addon.scribunto.lua.timeout_busy_wait" data-xocfg-key = "xowa.addon.scribunto.lua.timeout_busy_wait" data-xocfg-type = "int" accesskey = "d" class = "xocfg_data__int" type = "text" value = "250" >
2017-03-30 01:18:40 +00:00
< / div > <!-- HIDDEN:key,ctx -->
< input type = 'hidden' id = 'xowa.addon.scribunto.lua.timeout_busy_wait__key_box' value = 'xowa.addon.scribunto.lua.timeout_busy_wait' > < input type = 'hidden' id = 'xowa.addon.scribunto.lua.timeout_busy_wait__ctx_box' value = 'app' >
< / div > <!-- DIV:help -->
2017-01-04 02:15:53 +00:00
< div id = 'xowa.addon.scribunto.lua.timeout_busy_wait_help_div' class = 'xohelp_div' >
< div id = 'xowa.addon.scribunto.lua.timeout_busy_wait_help_msg' class = 'xohelp_msg' >
< p >
# of milliseconds before entering timeout poll This setting should be left at 250 (or higher). It is also meant to "tweak" certain outlier situations.< br >
Background:
< / p >
2016-04-17 15:48:03 +00:00
< ul >
< li >
2017-01-04 02:15:53 +00:00
On Windows, a sleep call can take 15 ms. This could potentially cause each Lua call to take 15 ms.
2016-04-17 15:48:03 +00:00
< / li >
< li >
2017-01-04 02:15:53 +00:00
Some pages / templates will call Lua hundreds of times. (For example: the Weather Box on < a tabindex = "-1" href = "/site/en.wikipedia.org/wiki/Aruba" > http://en.wikipedia.org/wiki/Aruba< / a > or the Citations on < a tabindex = "-1" href = "/site/en.wikipedia.org/wiki/Earth" > http://en.wikipedia.org/wiki/Earth< / a > )
2016-04-17 15:48:03 +00:00
< / li >
< li >
2017-01-04 02:15:53 +00:00
The busy wait is a primitive way to limit a wait to 1 ms (or less) before entering a more expensive sleep
2016-04-17 15:48:03 +00:00
< / li >
< li >
2017-01-04 02:15:53 +00:00
A higher timeout busy wait value is more performant, but the disadvantage is that the UI will be locked up for longer
2016-04-17 15:48:03 +00:00
< / li >
< / ul >
< dl >
< dd >
2017-01-04 02:15:53 +00:00
For example, a busy wait of 250 means that the code will loop for 250 milliseconds before entering a sleep.
2016-04-17 15:48:03 +00:00
< / dd >
< dd >
2017-01-04 02:15:53 +00:00
For sub-second values, this freezing will be unnoticeable
2016-04-17 15:48:03 +00:00
< / dd >
2017-01-04 02:15:53 +00:00
< / dl >
< p >
For reference, here is the corresponding code
< / p >
2016-04-17 15:48:03 +00:00
< pre style = "overflow:auto;" >
2017-01-04 02:15:53 +00:00
long time_bgn = System.currentTimeMillis();
2016-04-17 15:48:03 +00:00
long time_woke = time_bgn;
while (true) {
byte[] rv = stream_read.Data();
if (rv != null) return rv;
long time_now = System.currentTimeMillis();
if (time_now > time_woke + server_timeout_busy_wait) {
if (time_now > time_bgn + server_timeout) throw Xoa_xtn_scribunto.err_("lua_timeout: timeout={0} cmd={1}", server_timeout, String_.new_utf8_(cmd_last));
ThreadAdp_.Sleep(server_timeout_polling);
time_woke = System.currentTimeMillis();
}
}
< / pre >
2017-01-04 02:15:53 +00:00
< / div >
< / div >
2016-04-17 15:48:03 +00:00
< / div >
< / div >
2016-09-12 01:53:06 +00:00
2016-04-17 15:48:03 +00:00
< / div >
< / div >
< / div >
< div id = "mw-head" class = "noprint" >
< div id = "left-navigation" >
< div id = "p-namespaces" class = "vectorTabs" >
< h3 > Namespaces< / h3 >
< ul >
< li id = "ca-nstab-main" class = "selected" > < span > < a id = "ca-nstab-main-href" href = "index.html" > Page< / a > < / span > < / li >
< / ul >
< / div >
< / div >
< / div >
< div id = 'mw-panel' class = 'noprint' >
< div id = 'p-logo' >
< a style = "background-image: url(https://gnosygnu.github.io/xowa/xowa_logo.png);" href = "http://xowa.org/" title = "Visit the main page" > < / a >
< / div >
< div class = "portal" id = 'xowa-portal-home' >
< h3 > XOWA< / h3 >
< div class = "body" >
< ul >
< li > < a href = "http://xowa.org/index.html" title = 'Visit the main page' > Main page< / a > < / li >
< li > < a href = "http://xowa.org/screenshots.html" title = 'See screenshots of XOWA' > Screenshots< / a > < / li >
2016-06-26 06:10:12 +00:00
< li > < a href = "https://www.youtube.com/watch?v=q0qbXYXEH6M" title = "See a video of XOWA Desktop in action" > Video< / a > < / li >
2016-04-17 15:48:03 +00:00
< li > < a href = "http://xowa.org/home/wiki/Help/Download_XOWA.html" title = 'Download the XOWA application' > Download XOWA< / a > < / li >
< li > < a href = "http://xowa.org/home/wiki/Dashboard/Image_databases.html" title = 'Download offline wikis and image databases' > Download wikis< / a > < / li >
< / ul >
< / div >
< / div >
< div class = "portal" id = 'xowa-portal-started' >
< h3 > Getting started< / h3 >
< div class = "body" >
< ul >
< li > < a href = "http://xowa.org/home/wiki/App/Setup/System_requirements.html" title = 'Get XOWA's system requirements' > Requirements< / a > < / li >
< li > < a href = "http://xowa.org/home/wiki/App/Setup/Installation.html" title = 'Get instructions for installing XOWA' > Installation< / a > < / li >
< li > < a href = "http://xowa.org/home/wiki/App/Import/Simple_Wikipedia.html" title = 'Learn how to set up Simple Wikipedia' > Simple Wikipedia< / a > < / li >
< li > < a href = "http://xowa.org/home/wiki/App/Import/English_Wikipedia.html" title = 'Learn how to set up English Wikipedia' > English Wikipedia< / a > < / li >
< li > < a href = "http://xowa.org/home/wiki/App/Import/Other_wikis.html" title = 'Learn how to set up other Wikipedias' > Other Wikipedias< / a > < / li >
< / ul >
< / div >
< / div >
< div class = "portal" id = 'xowa-portal-android' >
< h3 > Android< / h3 >
< div class = "body" >
< ul >
< li > < a href = "http://xowa.org/home/wiki/Android/Setup.html" title = 'Setup XOWA on your Android device' > Setup< / a > < / li >
2016-06-26 06:10:12 +00:00
< li > < a href = "https://www.youtube.com/watch?v=jsMTBxGweUw" title = "See a video of XOWA Android in action" > Video< / a > < / li >
2016-04-17 15:48:03 +00:00
< / ul >
< / div >
< / div >
< div class = "portal" id = 'xowa-portal-help' >
< h3 > Help< / h3 >
< div class = "body" >
< ul >
< li > < a href = "http://xowa.org/home/wiki/Help/About.html" title = 'Get more information about XOWA' > About< / a > < / li >
< li > < a href = "http://xowa.org/home/wiki/Help/Contents.html" title = 'View a list of help topics' > Contents< / a > < / li >
< li > < a href = "http://xowa.org/home/wiki/Help/Media.html" title = 'Read what others have written about XOWA' > Media< / a > < / li >
< li > < a href = "http://xowa.org/home/wiki/Help/Feedback.html" title = 'Questions? Comments? Leave feedback for XOWA' > Feedback< / a > < / li >
< / ul >
< / div >
< / div >
< div class = "portal" id = 'xowa-portal-blog' >
< h3 > Blog< / h3 >
< div class = "body" >
< ul >
< li > < a href = "http://xowa.org/home/wiki/Blog.html" title = 'Follow XOWA' ' s development process ' > Current< / a > < / li >
< / ul >
< / div >
< / div >
< div class = "portal" id = 'xowa-portal-links' >
< h3 > Links< / h3 >
< div class = "body" >
< ul >
< li > < a href = "http://dumps.wikimedia.org/backup-index.html" title = "Get wiki datababase dumps directly from Wikimedia" > Wikimedia dumps< / a > < / li >
< li > < a href = "https://archive.org/search.php?query=xowa" title = "Search archive.org for XOWA files" > XOWA @ archive.org< / a > < / li >
< li > < a href = "http://en.wikipedia.org" title = "Visit Wikipedia (and compare to XOWA!)" > English Wikipedia< / a > < / li >
< / ul >
< / div >
< / div >
< div class = "portal" id = 'xowa-portal-donate' >
< h3 > Donate< / h3 >
< div class = "body" >
< ul >
< li > < a href = "https://archive.org/donate/index.php" title = "Support archive.org!" > archive.org< / a > < / li > <!-- listed first due to recent fire damages: http://blog.archive.org/2013/11/06/scanning - center - fire - please - help - rebuild/ -->
< li > < a href = "https://donate.wikimedia.org/wiki/Special:FundraiserRedirector" title = "Support Wikipedia!" > Wikipedia< / a > < / li >
2017-02-22 02:46:24 +00:00
< li > < a href = "http://xowa.org/home/wiki/Help/Donate.html" title = "Support XOWA!" > XOWA< / a > < / li >
2016-04-17 15:48:03 +00:00
< / ul >
< / div >
< / div >
2016-04-17 18:00:49 +00:00
2016-04-17 15:48:03 +00:00
< / div >
< / body >
< / html >