Repository navigation
feat: op registration during calls - #3375
Conversation
| dispatchers: Vec<Box<OpDispatcher>>, | ||
| name_to_id: HashMap<String, OpId>, | ||
| dispatchers: RwLock<Vec<Arc<Box<OpDispatcher>>>>, | ||
| name_to_id: RwLock<HashMap<String, OpId>>, |
There was a problem hiding this comment.
😭 this might impact performance, hot path will require to acquire a read lock everytime
There was a problem hiding this comment.
It doesn't look like it did in benchmarks.
There was a problem hiding this comment.
Yes, but they're flaky... Anyway why do you need to put dispatchers behind the lock? In native plugin PR you already have Arc<Mutex<Isolate>> available so you should be able to register new ops quite easily
There was a problem hiding this comment.
In most cases during dispatch we already have a lock on isolate somewhere else.
There was a problem hiding this comment.
I see... I'm curious to see it combined with native plugins PR
|
It doesn't look like it messed with the benchmarks much at all. I think it would take something pretty drastic on the rust side to really be noticeable beyond max latency. |
prerequisite for #3372