Added TODO around performance/scheduling issues with consumer.
diff --git a/TODO b/TODO
index 0a3067d..cdc74e6 100644
--- a/TODO
+++ b/TODO
@@ -17,6 +17,8 @@
e.g. utilizing two int32s? This would allow us to remove the atomic statements surrounding
i386 and ARM architecutes, but may be more effort than it's worth for our particular
use case...
+- Understand why "slower" consumer code is faster and more consistent when performing single-item
+ publishes
- I need to get some help doing some low-level profiling the application to find out where
the bottlenecks are and determining how the Go scheduler is hindering performance, if at all.
diff --git a/example/main.go b/example/main.go
index 403ac69..f82188a 100644
--- a/example/main.go
+++ b/example/main.go
@@ -26,7 +26,11 @@
readerCursors = append(readerCursors, readerCursor)
reader := disruptor.NewReader(writerBarrier, writerCursor, readerCursor)
+ // wildly sporadic times for single-item publish, e.g. 2 seconds, 65 ms, etc.
+ // faster for 2-3+ items per publish
// go consume(reader)
+
+ // constant time regardless of the number of items
go easyConsume(disruptor.NewEasyReader(reader, NewExampleConsumerHandler()))
}