You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@cordova.apache.org by curtiss-howard <gi...@git.apache.org> on 2012/09/24 14:53:05 UTC

incubator-cordova-android pull request: Alleviate PluginManager.exec() perf...

GitHub user curtiss-howard opened a pull request:

    https://github.com/apache/incubator-cordova-android/pull/49

    Alleviate PluginManager.exec() performance concerns

    IPlugin and PluginManager use org.json.JSONArray for passing in plugin arguments.  When a large JSON object is provided as an argument, performance is very poor as org.json is an eager, in-memory parser.  Users should have the ability to bypass PluginManager's automatic JSONArray parsing and instead receive the raw JSON argument string so that a faster JSON library can be leveraged.
    
    The proposed patch includes an IRawPlugin interface containing an exec() method that takes the raw argument string instead of the pre-parsed one.  Any plugin that wants to take advantage of this behavior needs to implement IRawPlugin, so current plugins aren't affected.

You can merge this pull request into a Git repository by running:

    $ git pull https://github.com/curtiss-howard/incubator-cordova-android master

Alternatively you can review and apply these changes as the patch at:

    https://github.com/apache/incubator-cordova-android/pull/49.patch

----
commit 1dffc5d7a0af5d6a4efbb31626d3e83ce309d10f
Author: Curtiss Howard <cj...@us.ibm.com>
Date:   2012-09-24T05:40:33-07:00

    Changes to allow for plugin execution with raw arguments.

----