diff options
author | Vsevolod Stakhov <vsevolod@highsecure.ru> | 2014-01-12 18:56:49 +0000 |
---|---|---|
committer | Vsevolod Stakhov <vsevolod@highsecure.ru> | 2014-01-12 18:56:49 +0000 |
commit | 767eb1ccf45151509acd32c2b56d24e743eb5781 (patch) | |
tree | 9b7bf7b83248696af8da8934a5c8e476552e6ad5 /doc | |
parent | fd31d7375b4a5af7cffe9f0863d152cc0013309e (diff) | |
download | rspamd-767eb1ccf45151509acd32c2b56d24e743eb5781.tar.gz rspamd-767eb1ccf45151509acd32c2b56d24e743eb5781.zip |
Some markdown fix.
Diffstat (limited to 'doc')
-rw-r--r-- | doc/markdown/configuration/ucl.md | 60 |
1 files changed, 29 insertions, 31 deletions
diff --git a/doc/markdown/configuration/ucl.md b/doc/markdown/configuration/ucl.md index e72caf223..aa266085d 100644 --- a/doc/markdown/configuration/ucl.md +++ b/doc/markdown/configuration/ucl.md @@ -207,6 +207,7 @@ UCL supports external macros both multiline and single line ones: .... }; ~~~ + There are two internal macros provided by UCL: * `include` - read a file `/path/to/file` or an url `http://example.com/file` and include it to the current place of @@ -235,13 +236,13 @@ to change in future libucl releases. UCL can handle multiline strings as well as single line ones. It uses shell/perl like notation for such objects: -~~~ -key = <<EOD -some text -splitted to -lines -EOD -~~~ + + key = <<EOD + some text + splitted to + lines + EOD + In this example `key` will be interpreted as the following string: `some text\nsplitted to\nlines`. Here are some rules for this syntax: @@ -251,14 +252,13 @@ Here are some rules for this syntax: * To finish multiline string you need to include a terminator string just after newline and followed by a newline (no spaces or other characters are allowed as well); * The initial and the final newlines are not inserted to the resulting string, but you can still specify newlines at the begin and at the end of a value, for example: -~~~ -key <<EOD - -some -text + key <<EOD + + some + text + + EOD -EOD -~~~ ## Emitter @@ -276,26 +276,24 @@ I got a 19Mb file that consist of ~700 thousands lines of json (obtained via <http://www.json-generator.com/>). Then I checked jansson library that performs json parsing and emitting and compared it with UCL. Here are results: -~~~ -jansson: parsed json in 1.3899 seconds -jansson: emitted object in 0.2609 seconds - -ucl: parsed input in 0.6649 seconds -ucl: emitted config in 0.2423 seconds -ucl: emitted json in 0.2329 seconds -ucl: emitted compact json in 0.1811 seconds -ucl: emitted yaml in 0.2489 seconds -~~~ + jansson: parsed json in 1.3899 seconds + jansson: emitted object in 0.2609 seconds + + ucl: parsed input in 0.6649 seconds + ucl: emitted config in 0.2423 seconds + ucl: emitted json in 0.2329 seconds + ucl: emitted compact json in 0.1811 seconds + ucl: emitted yaml in 0.2489 seconds So far, UCL seems to be significantly faster than jansson on parsing and slightly faster on emitting. Moreover, UCL compiled with optimizations (-O3) performs significantly faster: -~~~ -ucl: parsed input in 0.3002 seconds -ucl: emitted config in 0.1174 seconds -ucl: emitted json in 0.1174 seconds -ucl: emitted compact json in 0.0991 seconds -ucl: emitted yaml in 0.1354 seconds -~~~ + + ucl: parsed input in 0.3002 seconds + ucl: emitted config in 0.1174 seconds + ucl: emitted json in 0.1174 seconds + ucl: emitted compact json in 0.0991 seconds + ucl: emitted yaml in 0.1354 seconds + You can do your own benchmarks by running `make test` in libucl top directory. |