Skip to content

Commit

Permalink
Add support for external scripts.
Browse files Browse the repository at this point in the history
  • Loading branch information
smimram committed Nov 10, 2023
1 parent a1b23fd commit 5b22822
Show file tree
Hide file tree
Showing 8 changed files with 307 additions and 215 deletions.
2 changes: 2 additions & 0 deletions doc/Makefile
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
all:
@dune build @doc
3 changes: 0 additions & 3 deletions doc/content/.gitignore

This file was deleted.

4 changes: 4 additions & 0 deletions doc/content/liq/liquidsoap
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
#!/bin/sh
# shellcheck disable=SC2068

../../../liquidsoap $@
9 changes: 9 additions & 0 deletions doc/content/liq/space_overhead.liq
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
#!./liquidsoap
# This code was contributed by AzuraCast. Possible settings:
# - less memory: space_overhead = 20
# - less cpu: space_overhead = 140
# - balanced: space_overhead = 80

# Optimize for memory usage over CPU: this results in a slightly increased CPU
# usage and reduced memory usage.
runtime.gc.set(runtime.gc.get().{space_overhead=20, allocation_policy=2})
16 changes: 2 additions & 14 deletions doc/content/memory.md
Original file line number Diff line number Diff line change
Expand Up @@ -28,20 +28,8 @@ Inside liquidsoap scripts, the operations that the OCaml compiler provides to co

Typically, to change the garbage collector parameters, one can do:

```liquidsoap
# This code was contributed by AzuraCast:
# Possible settings:
# - less memory: space_overhead = 20
# - less cpu: space_overhead = 140
# - balanced: space_overhead = 80
# Optimize for memory usage over CPU
# This results in a slightly increased
# CPU usage and reduced memory usage.
runtime.gc.set(runtime.gc.get().{
space_overhead = 20,
allocation_policy = 2
})
```{.liquidsoap include="content/liq/space_overhead.liq" from=1}
```

These parameters and functions make it possible to experiment and see if you can find better parameters for your application.
Expand Down
Loading

0 comments on commit 5b22822

Please sign in to comment.