Dear Cordova developers and maintainers,

This is ECNU3D from GitHub. I want to propose a potential improvement for
the CDVCommandDelegateImpl.m. I filed a Github issue here:
https://github.com/apache/cordova-ios/issues/452

My primary concern is that currently Cordova doesn't have any control about
the concurrency of a plugin api call as we're using global dispatch queue
directly(application may easily reach the GCD global thread limitation if
developer abused async function like promise).

I think as iOS has already provided the more advanced NSOperationQueue
utility, why not we consider to replace the dispatch queue with it? Have a
limitation and control on number of concurrency of plugin calls from the
Cordova side will bring a lot of benefits and make the app more stable even
the app developer abused the plugin api call(call it with promise.all for
1000 times.).

I also created a PR to demonstrate this idea:
https://github.com/apache/cordova-ios/pull/454

I'm just a newbie of Cordova development, and input or feedback is largely
welcomed.

BR,
ECNU3D

Reply via email to