aboutsummaryrefslogtreecommitdiffstats
path: root/lib/diameter/doc
diff options
context:
space:
mode:
authorAnders Svensson <[email protected]>2015-07-07 13:34:57 +0200
committerAnders Svensson <[email protected]>2015-08-04 17:40:24 +0200
commit9ab5d8afedc6d2f56997276e3f016ec1c6dac6a5 (patch)
treed9a84cd1e37a257ccade39040f008737cd49ce01 /lib/diameter/doc
parent16aaa29b7ce40596520d563b6f4a8e0aeba7b085 (diff)
downloadotp-9ab5d8afedc6d2f56997276e3f016ec1c6dac6a5.tar.gz
otp-9ab5d8afedc6d2f56997276e3f016ec1c6dac6a5.tar.bz2
otp-9ab5d8afedc6d2f56997276e3f016ec1c6dac6a5.zip
Don't compute AVP list length unnecessarily at AVP decode
This has had a hugely negative impact on performance when decoding messages containing many AVP: each decode of an AVP having variable arity computed the length of the list of previously decoded AVPs when checking that the allowed arity was not exceeded, even if the allowed arity was infinite, making for O(n^2) cost. Here are some execution times, for diameter_codec:decode/2 on a representative message with n integer AVPs in the Common application (on the host at hand): Before After ------- --------- n = 1K 5 ms 2 ms n = 10K 500 ms 25 ms n = 100K 75 sec 225 ms n = 1M 2.6 sec Note the nearly linear increase following the change. Remove the dire documentation warning for incoming_maxlen as a consequence. It can still be useful to set, but not doing so won't have the same consequences as previously.
Diffstat (limited to 'lib/diameter/doc')
-rw-r--r--lib/diameter/doc/src/diameter.xml8
1 files changed, 0 insertions, 8 deletions
diff --git a/lib/diameter/doc/src/diameter.xml b/lib/diameter/doc/src/diameter.xml
index cb628f9529..854bc5b432 100644
--- a/lib/diameter/doc/src/diameter.xml
+++ b/lib/diameter/doc/src/diameter.xml
@@ -794,14 +794,6 @@ Messages larger than the specified number of bytes are discarded.</p>
Defaults to <c>16777215</c>, the maximum value of the 24-bit Message
Length field in a Diameter Header.</p>
-<warning>
-<p>
-This option should be set to as low a value as is sufficient for the
-Diameter applications and peers in question, since decoding incoming
-messages from a malicious peer can otherwise generate significant
-load.</p>
-</warning>
-
</item>
<tag><c>{restrict_connections, false