syncthing/lib
Jakob Borg fdcbd54cd7 lib/events: Be more resilient against dropping events (fixes #3952)
Instead of just immediately dropping the event if the subscription isn't
ready to receive it, give it 15 ms to catch up. The value 15 ms is
grabbed out of thin air - it just seems reasonable to me.

The timer juggling makes the event send pretty much exactly twice as
slow as it was before, but we're still under a microsecond. I think it's
negligible compared to whatever event that just happened that we're
interested in logging (usually a file operation of some kind).

	benchmark                  old ns/op     new ns/op     delta
	BenchmarkBufferedSub-8     475           950           +100.00%

	benchmark                  old allocs     new allocs     delta
	BenchmarkBufferedSub-8     4              4              +0.00%

	benchmark                  old bytes     new bytes     delta
	BenchmarkBufferedSub-8     104           117           +12.50%

GitHub-Pull-Request: https://github.com/syncthing/syncthing/pull/3960
2017-02-07 07:25:09 +00:00
..
auto build: Generate gui.files.go on the fly, remove from repo 2016-03-28 10:03:13 +00:00
beacon Remove unused struct field 2015-10-27 09:55:05 +01:00
config lib/weakhash, lib/model, cmd/syncthing: Decide if to use weakhash on startup (fixes #3938) 2017-02-06 10:27:11 +00:00
connections lib/connections: Fix rate limiting on arm64 (fixes #3921) 2017-01-23 20:55:00 +00:00
db lib/db: Don't panic on unknown folder in ListFolders (fixes #3584) 2017-01-04 10:34:52 +00:00
dialer lib/connections: Support setting traffic class (fixes #3790) 2016-12-21 11:01:15 +01:00
discover vendor: Update github.com/gogo/protobuf 2017-01-03 00:16:21 +00:00
events lib/events: Be more resilient against dropping events (fixes #3952) 2017-02-07 07:25:09 +00:00
fs cmd/syncthing, lib/fs, lib/sync: Spelling in comments 2017-02-05 18:51:52 +01:00
ignore lib/ignore: Centralize handling of temporary filenames (fixes #3899) 2017-01-17 07:33:48 +00:00
logger cmd/syncthing: Extract interfaces for things the API depends on 2016-03-21 19:36:08 +00:00
model lib/weakhash, lib/model, cmd/syncthing: Decide if to use weakhash on startup (fixes #3938) 2017-02-06 10:27:11 +00:00
nat lib/nat: Avoid concurrent reset of NAT timer (fixes #3337) 2016-06-26 10:17:12 +00:00
osutil lib/osutil: Replace IsDir with TraversesSymlink (fixes #3839) 2017-01-10 07:09:31 +00:00
pmp build, lib: Correct total test coverage calculation 2016-08-08 16:29:32 +00:00
protocol vendor: Update github.com/gogo/protobuf 2017-01-03 00:16:21 +00:00
rand lib/rand: Break out random functions into separate package 2016-05-26 07:02:56 +00:00
rc lib/rc: Remove pause to aggregate events (ref #3527) 2016-12-14 10:24:36 +01:00
relay lib/relay: Close invitation channel in all error cases (fixes #3726) 2016-11-13 09:32:05 +01:00
scanner scanner: Allow disabling weak hash in scanning (fixes #3891) 2017-01-23 13:50:32 +00:00
sha256 cmd/syncthing: Report real hashing performance, including weakhash 2017-01-23 21:56:43 +00:00
signature cmd/syncthing: Add selectable sha256 package (fixes #3613, fixes #3614) 2016-09-23 19:33:54 +00:00
stats build, lib: Correct total test coverage calculation 2016-08-08 16:29:32 +00:00
symlinks lib/model, lib/protocol, lib/scanner: Include symlink target in index, pull symlinks synchronously 2016-12-09 18:02:18 +00:00
sync cmd/syncthing, lib/fs, lib/sync: Spelling in comments 2017-02-05 18:51:52 +01:00
tlsutil build, lib: Correct total test coverage calculation 2016-08-08 16:29:32 +00:00
upgrade cmd/syncthing, gui, lib/config, lib/upgrade: Add option to upgrade to pre-releases 2017-01-27 12:17:06 +00:00
upnp lib/upnp: Wrong order of internal/external port after OnlyPermanentLeasesSupported (fixes #3924) 2017-01-23 23:17:02 +01:00
util lib/weakhash, lib/model, cmd/syncthing: Decide if to use weakhash on startup (fixes #3938) 2017-02-06 10:27:11 +00:00
versioner build: Enable gometalinter "gosimple" check, improve build.go 2016-12-21 14:53:45 +01:00
weakhash lib/weakhash, lib/model, cmd/syncthing: Decide if to use weakhash on startup (fixes #3938) 2017-02-06 10:27:11 +00:00