updated processEvent to process dispatching of events in parallel - #3362
updated processEvent to process dispatching of events in parallel#3362supravi96 wants to merge 1 commit into
Conversation
|
Having this loop to be sequential was made on purpose, originally because having too many parallel requests sent on the ssh channel would cause "ssh channel error" issues. With v3 and the introduction of Mapepire for SQL and CL commands, I reckon this won't happen as often. But still, if the event processing becomes sequential, we need a queue system for the ssh commands to prevent some events from crashing. |
|
@sebjulliand For context, Supravi was discussing this one with me because the team noticed delays in other extensions that were subscribing to the
If we did this, I wonder if this would actually slow things down for certain users which would not be good. As of right now, we don't make use of |
|
@SanjulaGanepola Mapepire is not the issue here; it has its own queue and there is no concurrency problem with it in Code for i as far as I can tell. So as long as subscribers run CL commands/SQL queries, it won't be a problem running everything in parallel, the queue will take care of handling that. The "Can't open SSH channel" issue seems to happen on some systems, maybe based on sshd settings. It happens for me when Mapepire is started, so...at a very early stage 馃ぃ I think haveing this PR tested and merged would be fine, the risk is limited. Then we should take a look at the channel thing separatly. |
|
@supravi96 I am currently looking into investigating the use of Mapepire Pools in Code4i which impact this. I will revisit this PR afterwards |
Changes
Currently once event is fired then order in which notifications are dispatched is sequential so some subscribers face delay in receiving notifications . Hence this pr will provide the changes that will make the processing parallelly not just one or two subscribers facing delay. This will resolve issue https://github.ibm.com/bob-for-ibm-i/vscode-ibmi-bob/issues/679
How to test this PR
Checklist
console.logs I added