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 DDE2BC272 for ; Thu, 21 Jun 2012 21:51:43 +0000 (UTC) Received: (qmail 93949 invoked by uid 500); 21 Jun 2012 21:51:43 -0000 Delivered-To: apmail-incubator-callback-dev-archive@incubator.apache.org Received: (qmail 93928 invoked by uid 500); 21 Jun 2012 21:51:43 -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 93916 invoked by uid 99); 21 Jun 2012 21:51:43 -0000 Received: from issues-vm.apache.org (HELO issues-vm) (140.211.11.160) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 21 Jun 2012 21:51:43 +0000 Received: from isssues-vm.apache.org (localhost [127.0.0.1]) by issues-vm (Postfix) with ESMTP id 3EA881416E9 for ; Thu, 21 Jun 2012 21:51:43 +0000 (UTC) Date: Thu, 21 Jun 2012 21:51:43 +0000 (UTC) From: "Becky Gibson (JIRA)" To: callback-dev@incubator.apache.org Message-ID: <680060973.41414.1340315503259.JavaMail.jiratomcat@issues-vm> In-Reply-To: <1643057892.1835.1337952506263.JavaMail.jiratomcat@issues-vm> Subject: [jira] [Commented] (CB-828) iOS contact.save() stucks the UI from updating on heavy load & has memory leaks. MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 [ https://issues.apache.org/jira/browse/CB-828?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13398900#comment-13398900 ] Becky Gibson commented on CB-828: --------------------------------- regarding ARC, I'm working on it here: https://github.com/becka11y/incubator-cordova-ios/tree/ARC As of 6/21 does compile and app loads but does not run. I'll slowly poke away at debugging and cleanup. I haven't looked at any of the blocks, yet, nor cleaned up passing of NSError references. > iOS contact.save() stucks the UI from updating on heavy load & has memory leaks. > -------------------------------------------------------------------------------- > > Key: CB-828 > URL: https://issues.apache.org/jira/browse/CB-828 > Project: Apache Cordova > Issue Type: Bug > Components: iOS > Reporter: Olivier Louvignes > Assignee: Shazron Abdullah > Labels: contacts > Fix For: 1.9.0 > > > I'm trying to restore 3000 contacts on a device, since i need to display a progress UI, I had to use something like this (SenchaTouch 2 code but you get the point). > [CODE] > //forEach contacts as contact... > _.delay(function() { > contact.save({callback : function(contact, operation) { > d&&console.log(displayName + ' ~ saved ('+ action +') contact', arguments); > j++; > App.getViewport().mask({message: __('restore...'), details: j + '/' + count, progress: j/count, mode: 'determinate'}); > // Last item ? > if(j == count) { > contactStore.clearFilter(); > return self.afterRestore(callback); > } > }}); > }, 25*i); > [/CODE] > Works quite well in the simulator but i'm getting regular "failed to return after waiting 10 seconds. main run loop mode: kCFRunLoopDefaultMode" on a device. > Major issue is that UI gets stuck for minutes. > Then i get a few "Received memory warning." > As if somehow the memory stacked somewhere (but the whole point of making separate call was to avoid memory breakdown), so there might be a leak. > At the end, it sometimes work / crash. > Would there be a way to somehow use another thread for theses AddressBook operations? > How could i prevent theses memory leaks? -- 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