incubator-callback-dev mailing list archives

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


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 IO Encoding and Performance iOS 
> -------------------------------------
>                 Key: CB-390
>                 URL:
>             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:!default.jspa
For more information on JIRA, see:


View raw message