syncthing/lib
greatroar 807a6b1022
lib/model: Optimize jobQueue performance and memory use (#8023)
By truncating time.Time to an int64 nanosecond count, we lose the
ability to precisely order timestamps before 1678 or after 2262, but we
gain (linux/amd64, Go 1.17.1):

name                      old time/op    new time/op    delta
JobQueuePushPopDone10k-8    2.85ms ± 5%    2.29ms ± 2%  -19.80%  (p=0.000 n=20+18)
JobQueueBump-8              34.0µs ± 1%    29.8µs ± 1%  -12.35%  (p=0.000 n=19+19)

name                      old alloc/op   new alloc/op   delta
JobQueuePushPopDone10k-8    2.56MB ± 0%    1.76MB ± 0%  -31.31%  (p=0.000 n=18+13)

name                      old allocs/op  new allocs/op  delta
JobQueuePushPopDone10k-8      23.0 ± 0%      23.0 ± 0%     ~     (all equal)

Results for BenchmarkJobQueueBump are with the fixed version, which no
longer depends on b.N for the amount of work performed. rand.Rand.Intn
is cheap at ~10ns per iteration.
2021-10-29 20:20:46 +02:00
..
api lib/model: Don't reset db while folder is running (fixes #7935) (#7936) 2021-09-11 17:14:47 +02:00
assets lib/assets: Allow assets to remain uncompressed (#6661) 2020-05-25 08:51:27 +02:00
beacon all: Unused args, retvals, assignments (#7926) 2021-09-08 00:11:16 +02:00
build all: Update build constraints to Go 1.17 style (#7894) 2021-08-17 10:10:41 +02:00
config lib/config: Always set mtime window to 2 on Android unless ext detected (ref #7963) (#7966) 2021-09-27 21:29:51 +02:00
connections lib/connections: Fix and optimize registry (#7996) 2021-10-06 10:52:51 +02:00
db build: Update all dependencies (#7968) 2021-09-26 12:08:23 +02:00
dialer lib/connections: Fix and optimize registry (#7996) 2021-10-06 10:52:51 +02:00
discover lib/discover, lib/protocol: Buffer allocation 2021-09-06 15:30:56 +02:00
events build: List go:generate tools in tools.go (#7599) 2021-05-08 12:52:06 +02:00
fs lib/fs: Optimize TempName + some cosmetic changes (#7911) 2021-08-29 10:47:53 +02:00
ignore all: Unused args, retvals, assignments (#7926) 2021-09-08 00:11:16 +02:00
locations all: Simplify some method calls (#7499) 2021-03-17 23:12:26 +01:00
logger build: List go:generate tools in tools.go (#7599) 2021-05-08 12:52:06 +02:00
model lib/model: Optimize jobQueue performance and memory use (#8023) 2021-10-29 20:20:46 +02:00
nat all: Refactor preparing configuration (#7127) 2020-11-20 14:21:54 +01:00
osutil all: Update build constraints to Go 1.17 style (#7894) 2021-08-17 10:10:41 +02:00
pmp lib/nat: Make service termination faster (#6777) 2020-06-22 09:01:57 +01:00
protocol lib/protocol: Simplify codeToError, errorToCode 2021-10-22 18:40:40 +02:00
rand lib/rand: Optimizations (#7964) 2021-09-26 12:15:39 +02:00
rc test, lib/model: Various integration test updates & improvements (#6956) 2020-09-07 09:35:37 +02:00
relay lib/relay/protocol: Merge two Sprintf calls 2021-09-06 15:30:56 +02:00
scanner lib/fs: Ignore normalization differences in case insensitive lookup (fixes #7677) (#7678) 2021-05-17 12:35:03 +02:00
sha256 all: Use crypt/rand through its buffered version, but not in benchmarks (#7420) 2021-03-02 19:17:20 +01:00
signature all: Use crypt/rand through its buffered version, but not in benchmarks (#7420) 2021-03-02 19:17:20 +01:00
stats all: Truncate some timestamps (fixes #7457) (#7459) 2021-03-12 10:35:10 +01:00
stun lib/stun: Prevent nil deref when naming service (#7872) 2021-08-05 00:04:22 +01:00
svcutil lib/relay, lib/svcutil: Improve service logging (fixes #7580) (#7647) 2021-05-10 22:26:25 +02:00
sync lib/sync: Cleanly fail instead of panic in tests (#6088) 2019-10-16 10:11:11 +02:00
syncthing all: Clarify 'Cleaning data for folder' log message (#7937) 2021-09-10 09:56:44 +02:00
testutils lib: Use counterfeiter to mock interfaces in tests (#7375) 2021-03-03 08:53:50 +01:00
tlsutil lib/tlsutil: Allocate UnionedConnection in one go (#7912) 2021-09-21 08:40:34 +02:00
upgrade all: Update build constraints to Go 1.17 style (#7894) 2021-08-17 10:10:41 +02:00
upnp all: Simplify some method calls (#7499) 2021-03-17 23:12:26 +01:00
ur lib/ur: Fix panic build goroutines for failures (#7903) 2021-08-25 07:16:55 +02:00
util lib/connections: Fix and optimize registry (#7996) 2021-10-06 10:52:51 +02:00
versioner all: Simplify some method calls (#7499) 2021-03-17 23:12:26 +01:00
watchaggregator lib/watchaggregator: Replace counter map by two integers (#7856) 2021-08-01 12:30:20 +02:00
weakhash lib/weakhash: Fix speed reporting in benchmark (#6470) 2020-03-29 17:07:25 +02:00