This is an old revision of the document!
JavaScript
Synchronet's JavaScript settings can be adjusted in the Synchronet for Windows Control Panel File->Properties->JavaScript tab:
The following .ini files contain the Synchronet JavaScript configuration settings:
Key | Default Value | Description |
---|---|---|
JavaScriptMaxBytes | 16MB | Maximum run-time heap size (per script invocation) |
JavaScriptTimeLimit | 864000 | Maximum total execution time of a script (in 1/10th second units, 0=disabled) |
JavaScriptGcInterval | 100 | Garbage collection interval (in “operation callbacks”, 0=disabled) |
JavaScriptYieldInterval | 10000 | Time-slice yield interval (in “operation callbacks”, 0=disabled) |
JavaScriptLoadPath | load | Directories (comma-separated) to search for JS load-libraries |
JavaScriptOptions | JIT | COMPILE_N_GO | See Options below |
Notes
JavaScriptTimeLimit
Default: 864000
(24 hours)
Maximum number of ticks (100ms) before auto-termination of a JavaScript script (i.e. infinite loop detection).
Set to 0
for unlimited time (disables infinite loop detection).
Note: This key replaces the old JavaScriptBranchLimit
key which is no longer used (as of Synchronet v3.16).
JavaScriptGcInterval
Default: 100
JavaScript Garbage Collection interval (in ticks).
Set to 0
for never.
JavaScriptYieldInterval
Default: 10000
Time-slice yield interval (in ticks).
Set to 0
for never.
JavaScriptLoadPath
Default: load
Comma-separated list of load paths (relative to exec
or mods
directories).
These are the directories/sub-directories where the JavaScript load()
method will search for filenames to be loaded by other scripts.
Options
JavaScript compiler options may be controlled via the JavaScriptOptions
bit-field key value. Multiple option flags may be specified by bit-wise ORing them together with the |
symbol.
Option | Description |
---|---|
STRICT | Warn on dubious practice (similar to “use strict” ) |
WERROR | Convert warnings to fatal errors |
VAROBJFIX | Use the last object of scope chain as the ECMA 'variables object' |
COMPILE_N_GO | Compile-time scope chain resolution of const s |
RELIMIT | Disallow excessively recursive regular expressions |
ANONFUNFIX | Disallow function () {} in statement context per ECMA-262 Edition 3 |
JIT | Enable TraceMonkey just-in-time compiler |
METHODJIT | Enable JägerMonkey just-in-time compiler |
PROFILING | Use profiler to choose between TraceMonkey and JägerMonkey at run-time |
METHODJIT_ALWAYS | Always use the JägerMonkey JIT compiler (don't tune at run-time) |
The default JavaScript option flags (when the key is not specified) are:
JIT | COMPILE_N_GO