neo-project / neo-modules

MIT License
60 stars 100 forks source link

ConcurrentDictionary be used instead of Dictionary #808

Closed cschuchardt88 closed 11 months ago

cschuchardt88 commented 1 year ago

Summary or problem description I think you should be using ConcurrentDictionary, so you dont have to use Lock and wait for locked threads to complete

Do you have any solution you want to propose? It is a know brainer. But one such scenario would be for example. Having millions of clients on public node could at some point lock the threads in-return clients will be waiting for locks to be lifted. As of now its pretty lite traffic. But as neo picks up new users and implements new features such as websocket we will see at some point millions of clients and 5k transactions/ iterators locking up sessions and responses may timeout.

Where in the software does this update applies to?