incubator-callback-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Becky Gibson (Commented) (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (CB-390) File IO Encoding and Performance iOS
Date Thu, 05 Apr 2012 19:52:24 GMT

    [ 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

        

Mime
View raw message