tailscale/ipn
David Anderson 9cd4e65191 smallzstd: new package that constructs zstd small encoders/decoders.
It's just a config wrapper that passes "use less memory at the
expense of compression" parameters by default, so that we don't
accidentally construct resource-hungry (de)compressors.

Also includes a benchmark that measures the memory cost of the
small variants vs. the stock variants. The savings are significant
on both compressors (~8x less memory) and decompressors (~1.4x less,
not including the savings from the significantly smaller
window on the compression side - with those savings included it's
more like ~140x smaller).

BenchmarkSmallEncoder-8            	   56174	     19354 ns/op	      31 B/op	       0 allocs/op
BenchmarkSmallEncoderWithBuild-8   	    2900	    382940 ns/op	 1746547 B/op	      36 allocs/op
BenchmarkStockEncoder-8            	   48921	     25761 ns/op	     286 B/op	       0 allocs/op
BenchmarkStockEncoderWithBuild-8   	     426	   2630241 ns/op	13843842 B/op	     124 allocs/op
BenchmarkSmallDecoder-8            	  123814	      9344 ns/op	       0 B/op	       0 allocs/op
BenchmarkSmallDecoderWithBuild-8   	   41547	     27455 ns/op	   27694 B/op	      31 allocs/op
BenchmarkStockDecoder-8            	  129832	      9417 ns/op	       1 B/op	       0 allocs/op
BenchmarkStockDecoderWithBuild-8   	   25561	     51751 ns/op	   39607 B/op	      92 allocs/op

Signed-off-by: David Anderson <danderson@tailscale.com>
2020-07-02 16:13:06 -07:00
..
ipnserver smallzstd: new package that constructs zstd small encoders/decoders. 2020-07-02 16:13:06 -07:00
ipnstate ipn/ipnstate: improve HTML output 2020-05-08 14:29:42 -07:00
policy ipn, ipn/policy: filter portlist to a short list of "interesting" ports 2020-04-01 10:03:44 -07:00
backend.go ipn: Resolve some resource leaks in test. 2020-05-21 16:37:25 -04:00
doc.go Move Linux client & common packages into a public repo. 2020-02-09 09:32:57 -08:00
fake_test.go ipn, wgengine/filter: remove exported type aliases 2020-05-11 07:19:17 -07:00
handle.go ipn, wgengine/filter: remove exported type aliases 2020-05-11 07:19:17 -07:00
local.go wgengine/magicsock: add new endpoint type used for discovery-supporting peers 2020-06-29 13:59:54 -07:00
message_test.go Add tstest.PanicOnLog(), and fix various problems detected by this. 2020-05-13 23:12:35 -04:00
message.go ipn: add AllowVersionSkew bool to Notify & Message 2020-05-09 13:51:48 -07:00
prefs_test.go ipn: add Hostname override to Prefs 2020-06-02 21:40:27 +02:00
prefs.go ipn: add Hostname override to Prefs 2020-06-02 21:40:27 +02:00
store_test.go Add tstest.PanicOnLog(), and fix various problems detected by this. 2020-05-13 23:12:35 -04:00
store.go ipn: have NewFileStore try to create directories as needed 2020-03-03 11:51:44 -08:00