Async events improve#85
Async events improve#85ramon-bernardo wants to merge 3 commits intoRy-ot:mainfrom ramon-bernardo:async-event-improve
Conversation
| async-std = "1.12.0" | ||
| derive_more = "0.99.17" | ||
| serde_repr = "0.1" | ||
| crossbeam-channel = "0.5.12" |
There was a problem hiding this comment.
Se preferir, posso mudar para o workspace.
|
Hi, thank you for collaborating! Can you summarize the main differences between crossbeam and mpsc? |
|
Até um tempo atrás, crossbeam-channel e std::sync::mpsc tinham uma grande diferença de desempenho. Pesquisando um pouco mais, parece que foi mesclado o código do crossbeam-channel no mpsc std, no entanto, as melhorias e correções sempre chegam mais cedo em crossbeam-channel do que em std. Por exemplo, esta correção ainda sairá em rust 1.78.0, e já foi corrigido no crossbeam-channel. O uso de crossbeam-channel também nos da a possibilidade de usar: try_send, send_timeout, send_deadline, is_empty, is_full, len, capacity, same_channel no |
|
Hi @ramon-bernardo, Thanks for the effort you put in here and for presenting us with the crossbeam option. At this time, I don't see a compelling reason to add an external dependency when the standard library is doing a good enough job and we're not seeing any performance issues. We also don't need multi-consumer so that's another reason why sticking with mpsc is the current choice. Another piece of feedback: please try to stick to English in public communications here on Github. This project is open source because we want to make it as inclusive as possible, and English is the language that enables the most amount of people to understand us here. Once again, thank you for putting this work in, but at the time we're not going to take it. |
|
@luan, os benchmarks atuais do crossbeam-channel estão desatualizados, procurando um mais recente, percebe-se uma melhoria de até 40% em SPSC e 80% em MPSC. |
As explained above, please stick to english. We will no longer reply messages that are not in english. Thank you again for your time and for contributing. |

Melhorias
EventSenderparaAsyncEventSendereEventReceiverparaAsyncEventReceiver.AsyncEventSet, possibilitando ordenar os sistemas.channel_to_eventparaunbounded_channel_to_event.PreUpdateao invés deUpdate.Meu analyzer ta bugado com os 600 pacotes do projeto, além dos arquivos proto, pode ser que precise de algum polimento no código, além da doc do SystemSet.