Return-Path: X-Original-To: apmail-incubator-callback-dev-archive@minotaur.apache.org Delivered-To: apmail-incubator-callback-dev-archive@minotaur.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 159A39C22 for ; Thu, 5 Apr 2012 19:52:46 +0000 (UTC) Received: (qmail 66809 invoked by uid 500); 5 Apr 2012 19:52:45 -0000 Delivered-To: apmail-incubator-callback-dev-archive@incubator.apache.org Received: (qmail 66768 invoked by uid 500); 5 Apr 2012 19:52:45 -0000 Mailing-List: contact callback-dev-help@incubator.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: callback-dev@incubator.apache.org Delivered-To: mailing list callback-dev@incubator.apache.org Received: (qmail 66537 invoked by uid 99); 5 Apr 2012 19:52:45 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 05 Apr 2012 19:52:45 +0000 X-ASF-Spam-Status: No, hits=-2000.0 required=5.0 tests=ALL_TRUSTED,T_RP_MATCHES_RCVD X-Spam-Check-By: apache.org Received: from [140.211.11.116] (HELO hel.zones.apache.org) (140.211.11.116) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 05 Apr 2012 19:52:44 +0000 Received: from hel.zones.apache.org (hel.zones.apache.org [140.211.11.116]) by hel.zones.apache.org (Postfix) with ESMTP id 8289A35AB2F for ; Thu, 5 Apr 2012 19:52:24 +0000 (UTC) Date: Thu, 5 Apr 2012 19:52:24 +0000 (UTC) From: "Becky Gibson (Commented) (JIRA)" To: callback-dev@incubator.apache.org Message-ID: <894950421.19176.1333655544547.JavaMail.tomcat@hel.zones.apache.org> In-Reply-To: <226322164.22306.1332832897502.JavaMail.tomcat@hel.zones.apache.org> Subject: [jira] [Commented] (CB-390) File IO Encoding and Performance iOS MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 X-Virus-Checked: Checked by ClamAV on 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