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 (JIRA)" <ji...@apache.org> on 2012/09/24 14:57:07 UTC
[jira] [Created] (CB-1530) Alleviate PluginManager.exec()
performance concerns
Curtiss Howard created CB-1530:
----------------------------------
Summary: Alleviate PluginManager.exec() performance concerns
Key: CB-1530
URL: https://issues.apache.org/jira/browse/CB-1530
Project: Apache Cordova
Issue Type: Improvement
Components: Android
Affects Versions: Master
Environment: Android
Reporter: Curtiss Howard
Assignee: Joe Bowser
Fix For: Master
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.
There is a pull request with the proposed change at https://github.com/apache/incubator-cordova-android/pull/49
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] [Assigned] (CB-1530) Alleviate PluginManager.exec()
performance concerns
Posted by "Andrew Grieve (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/CB-1530?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Andrew Grieve reassigned CB-1530:
---------------------------------
Assignee: Andrew Grieve (was: Joe Bowser)
> Alleviate PluginManager.exec() performance concerns
> ---------------------------------------------------
>
> Key: CB-1530
> URL: https://issues.apache.org/jira/browse/CB-1530
> Project: Apache Cordova
> Issue Type: Improvement
> Components: Android
> Affects Versions: Master
> Environment: Android
> Reporter: Curtiss Howard
> Assignee: Andrew Grieve
> Fix For: Master
>
>
> 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.
> There is a pull request with the proposed change at https://github.com/apache/incubator-cordova-android/pull/49
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] [Resolved] (CB-1530) Alleviate PluginManager.exec()
performance concerns
Posted by "Andrew Grieve (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/CB-1530?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Andrew Grieve resolved CB-1530.
-------------------------------
Resolution: Fixed
Fixed with refactoring as discussed on mailing-list.
commit: https://git-wip-us.apache.org/repos/asf?p=incubator-cordova-android.git;a=commit;h=6e6e0275add95a8caed647bdf862aded138bfecd
> Alleviate PluginManager.exec() performance concerns
> ---------------------------------------------------
>
> Key: CB-1530
> URL: https://issues.apache.org/jira/browse/CB-1530
> Project: Apache Cordova
> Issue Type: Improvement
> Components: Android
> Affects Versions: Master
> Environment: Android
> Reporter: Curtiss Howard
> Assignee: Andrew Grieve
> Fix For: Master
>
>
> 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.
> There is a pull request with the proposed change at https://github.com/apache/incubator-cordova-android/pull/49
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] [Commented] (CB-1530) Alleviate PluginManager.exec()
performance concerns
Posted by "Andrew Grieve (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/CB-1530?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13462119#comment-13462119 ]
Andrew Grieve commented on CB-1530:
-----------------------------------
Hi Curtiss,
Definitely like this idea. Thanks for bringing it up! I have another frustration with the way plugins work on Android around, which I just filed today:
https://issues.apache.org/jira/browse/CB-1532
Let me put together a proposal for a patch which includes your change as well as addressing my issue. I'll post it to the mailing-list, and hopefully get some approval :).
I should be able to get to this tomorrow.
As an aside, are you using a better JSON library? or just doing manual parsing of the payload?
> Alleviate PluginManager.exec() performance concerns
> ---------------------------------------------------
>
> Key: CB-1530
> URL: https://issues.apache.org/jira/browse/CB-1530
> Project: Apache Cordova
> Issue Type: Improvement
> Components: Android
> Affects Versions: Master
> Environment: Android
> Reporter: Curtiss Howard
> Assignee: Joe Bowser
> Fix For: Master
>
>
> 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.
> There is a pull request with the proposed change at https://github.com/apache/incubator-cordova-android/pull/49
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] [Commented] (CB-1530) Alleviate PluginManager.exec()
performance concerns
Posted by "Curtiss Howard (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/CB-1530?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13462197#comment-13462197 ]
Curtiss Howard commented on CB-1530:
------------------------------------
Hi Andrew, thanks for the quick response.
As far as using another JSON library is concerned, we're essentially forced to do so because one particular plugin method can take an enormous argument payload and org.json just isn't cut out for that. We're using Jackson so we can stream everything in. But I think for 99% of cases something like org.json is fine since argument arrays tend to be small and simple, hence why the patch is structured the way it is (I don't want to burden users with having to parse the JSON themselves unless they have to).
> Alleviate PluginManager.exec() performance concerns
> ---------------------------------------------------
>
> Key: CB-1530
> URL: https://issues.apache.org/jira/browse/CB-1530
> Project: Apache Cordova
> Issue Type: Improvement
> Components: Android
> Affects Versions: Master
> Environment: Android
> Reporter: Curtiss Howard
> Assignee: Andrew Grieve
> Fix For: Master
>
>
> 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.
> There is a pull request with the proposed change at https://github.com/apache/incubator-cordova-android/pull/49
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira