netns: add comment about undesirable algorithmic complexity

We don't want to be Accidentally Quadratic™
This commit is contained in:
Erik Arvstedt 2020-08-21 22:35:57 +02:00
parent a3ae8668e6
commit 0f0f6ddbb9
No known key found for this signature in database
GPG Key ID: 33312B944DD97846

View File

@ -16,6 +16,12 @@ let
# availableNetns.bitcoind = [ "clighting" ];
# and
# availableNetns.clighting = [ "bitcoind" ];
#
# FIXME: Although negligible for our purposes, this calculation's runtime
# is in the order of (number of connections * number of services),
# because attrsets and lists are fully copied on each update with '//' or '++'.
# This can only be improved with an update in the nix language.
#
availableNetns = let
# base = { clightning = [ "bitcoind" ]; ... }
base = builtins.mapAttrs (n: v: