Github user vanzin commented on the issue:

    https://github.com/apache/spark/pull/18253
  
    > This implementation had 2 advantages... it use much less synchronization.
    
    Yes, but have you quantified how much you win with that? If the blocking 
queue approach has enough throughput for the listener bus, it's safer to use it.
    
    > is that no object is created for each message added to the queue
    
    Well, you could use an `ArrayBlockingQueue`. Then no extra object is 
allocated either.
    
    Here's a link with numbers for `ArrayBlockingQueue`:
    https://github.com/LMAX-Exchange/disruptor/wiki/Performance-Results
    
    4M ops per sec in the 1P-1C case looks plenty fast for Spark's need.
    
    > I change it to 1 ms instead of 20ms. 
    
    I think if you really insist on going this route, you should use 
`LockSupport.park/unpark` instead of fighting for CPU time like this.


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at [email protected] or file a JIRA ticket
with INFRA.
---

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to