You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@cordova.apache.org by "Lee Crossley (Created) (JIRA)" <ji...@apache.org> on 2012/03/27 09:21:37 UTC

[jira] [Created] (CB-390) File IO Encoding and Performance iOS

File IO Encoding and Performance iOS 
-------------------------------------

                 Key: CB-390
                 URL: https://issues.apache.org/jira/browse/CB-390
             Project: Apache Callback
          Issue Type: Bug
          Components: iOS
    Affects Versions: 1.5.0
            Reporter: Lee Crossley
            Assignee: Shazron Abdullah


The performance of the Apache Callback / Cordova file IO operations on iOS is causing problems (memory exceptions for large files). The encoding should be removed, as it is not required and there also is double (triple) buffer allocation, NSString has a read method, so why isn't that just used?

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Updated] (CB-390) File IO Encoding and Performance iOS

Posted by "Lee Crossley (Updated) (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/CB-390?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Lee Crossley updated CB-390:
----------------------------

    Description: The performance of the Apache Callback / Cordova file IO operations on iOS is causing problems (memory exceptions for large files). The encoding should be removed, as it is not required and there also is double (triple) buffer allocation. NSString has a read method, so why isn't that just used?  (was: The performance of the Apache Callback / Cordova file IO operations on iOS is causing problems (memory exceptions for large files). The encoding should be removed, as it is not required and there also is double (triple) buffer allocation, NSString has a read method, so why isn't that just used?)
    
> File IO Encoding and Performance iOS 
> -------------------------------------
>
>                 Key: CB-390
>                 URL: https://issues.apache.org/jira/browse/CB-390
>             Project: Apache Callback
>          Issue Type: Bug
>          Components: iOS
>    Affects Versions: 1.5.0
>            Reporter: Lee Crossley
>            Assignee: Shazron Abdullah
>
> The performance of the Apache Callback / Cordova file IO operations on iOS is causing problems (memory exceptions for large files). The encoding should be removed, as it is not required and there also is double (triple) buffer allocation. NSString has a read method, so why isn't that just used?

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Assigned] (CB-390) File IO Encoding and Performance iOS

Posted by "Shazron Abdullah (Assigned) (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/CB-390?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Shazron Abdullah reassigned CB-390:
-----------------------------------

    Assignee:     (was: Shazron Abdullah)
    
> File IO Encoding and Performance iOS 
> -------------------------------------
>
>                 Key: CB-390
>                 URL: https://issues.apache.org/jira/browse/CB-390
>             Project: Apache Callback
>          Issue Type: Bug
>          Components: iOS
>    Affects Versions: 1.5.0
>            Reporter: Lee Crossley
>
> The performance of the Apache Callback / Cordova file IO operations on iOS is causing problems (memory exceptions for large files). The encoding should be removed, as it is not required and there also is double (triple) buffer allocation. NSString has a read method, so why isn't that just used?

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Commented] (CB-390) File IO Encoding and Performance iOS

Posted by "Becky Gibson (Commented) (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/CB-390?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13247580#comment-13247580 ] 

Becky Gibson commented on CB-390:
---------------------------------

There is no method on the FileWriter to support an encoding so UTF is always used in order to support non-ascii data. 

The reason for not using the NSString writeToFile method (which  now requires the specification of an encoding) is that it doesn't allow for appending - it overwrites any existing file at that path.  We could possibly use  stringWithContentsOfFile: usedEncoding: error to read the file but I don't think that will affect the performance.   I'm open to modifying the code to be more efficient but changing from using NSOutputStream to using NSString methods would require more involved error checking for file existence and more work to append to an existing file.  


                
> File IO Encoding and Performance iOS 
> -------------------------------------
>
>                 Key: CB-390
>                 URL: https://issues.apache.org/jira/browse/CB-390
>             Project: Apache Callback
>          Issue Type: Bug
>          Components: iOS
>    Affects Versions: 1.5.0
>            Reporter: Lee Crossley
>            Assignee: Shazron Abdullah
>
> The performance of the Apache Callback / Cordova file IO operations on iOS is causing problems (memory exceptions for large files). The encoding should be removed, as it is not required and there also is double (triple) buffer allocation. NSString has a read method, so why isn't that just used?

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Closed] (CB-390) File IO Encoding and Performance iOS

Posted by "Lee Crossley (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/CB-390?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Lee Crossley closed CB-390.
---------------------------

    Resolution: Unresolved
    
> File IO Encoding and Performance iOS 
> -------------------------------------
>
>                 Key: CB-390
>                 URL: https://issues.apache.org/jira/browse/CB-390
>             Project: Apache Cordova
>          Issue Type: Bug
>          Components: iOS
>    Affects Versions: 1.5.0
>            Reporter: Lee Crossley
>
> The performance of the Apache Callback / Cordova file IO operations on iOS is causing problems (memory exceptions for large files). The encoding should be removed, as it is not required and there also is double (triple) buffer allocation. NSString has a read method, so why isn't that just used?

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira