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 B2412D27D for ; Mon, 24 Sep 2012 20:51:46 +0000 (UTC) Received: (qmail 2461 invoked by uid 500); 24 Sep 2012 20:51:46 -0000 Delivered-To: apmail-incubator-callback-dev-archive@incubator.apache.org Received: (qmail 2435 invoked by uid 500); 24 Sep 2012 20:51:46 -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 2427 invoked by uid 99); 24 Sep 2012 20:51:46 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 24 Sep 2012 20:51:46 +0000 X-ASF-Spam-Status: No, hits=1.5 required=5.0 tests=HTML_MESSAGE,RCVD_IN_DNSWL_LOW,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (nike.apache.org: domain of agrieve@google.com designates 209.85.219.47 as permitted sender) Received: from [209.85.219.47] (HELO mail-oa0-f47.google.com) (209.85.219.47) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 24 Sep 2012 20:51:38 +0000 Received: by oagn9 with SMTP id n9so6024976oag.6 for ; Mon, 24 Sep 2012 13:51:17 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20120113; h=mime-version:from:date:message-id:subject:to:content-type :x-system-of-record; bh=YIk2MsuxHSypypw0AiXn6Ihb1JD5/xf3j7wRg9PpXdk=; b=AqEh1BubKpKlaoi86x/lwZ8jZE9EGkds3vbYZj+CwqjYl/5VeVphzEZ9AbzV9esNMI F1nYvdSBaHav+ACowYFTfupB8+vCRqiP4NQHCtVBdB3Bmkdf7Io77KwI/KOpNA2gff/H YEMBGNiADlPN7pXFlPecYN6jpTeKBUI0py9rT5bVT8i+bs+/72PhK7xoHYyeLQgCjAkG PJAnW3lSRm/OE8Ex7mrlbVuTIUBKb11mEYePqOgTAyGZpvFDLZRVQTO3g4ZcvYp9Zee6 ZQwd4UbMCBrmneEjC7GMf6LkUvUpiXDggpDpp3p9obKALiK7BGK0YwQ53lk3Pvnntogb PmjQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20120113; h=mime-version:from:date:message-id:subject:to:content-type :x-system-of-record:x-gm-message-state; bh=YIk2MsuxHSypypw0AiXn6Ihb1JD5/xf3j7wRg9PpXdk=; b=JleTw+h5DzZdR0tGZPSRb64blmzJp2lGDaBYtZ1F1qFGldHCJ8g6U3DdvBZ/WK8ozU /VWweWmdxVDYQVOz/2nqPh4bIXbmFs1Ey7Vk0yv9voMvzpwSuoUPVj03dinJUOc+mlh3 cmygjuWQWIAj3PXiDeXcxx9nOOWvZWcF/d2vjLzzyyvJxSFy0TzG8S+Nbyt1LThH3LW9 ESpWX+G6qMuOtI+5rFRhqbvRJ82K8rO0touU2XFLFNSDoKk+kCfoN8iCMq0BQzndi1gv Dzuf0w3o5gBM9OtBaqU4E6xefjsKgG3dxGYZ8dYCEhfMTzG+0gbwjvN9H4EeSMxHKmc8 jHBg== Received: by 10.60.7.197 with SMTP id l5mr11043273oea.33.1348519877901; Mon, 24 Sep 2012 13:51:17 -0700 (PDT) Received: by 10.60.7.197 with SMTP id l5mr11043268oea.33.1348519877700; Mon, 24 Sep 2012 13:51:17 -0700 (PDT) MIME-Version: 1.0 Received: by 10.182.124.101 with HTTP; Mon, 24 Sep 2012 13:50:57 -0700 (PDT) From: Andrew Grieve Date: Mon, 24 Sep 2012 16:50:57 -0400 Message-ID: Subject: Having a shared thread pool on Android To: callback-dev@incubator.apache.org Content-Type: multipart/alternative; boundary=e89a8f83a163486bb104ca78c0ff X-System-Of-Record: true X-Gm-Message-State: ALoCoQnEzsEVk5cXya8648c5DwNHvkKjhI6Q1drQQnfWHo3Vxv3tMKTSFI9MK6aEEdIbAqsH11yeLk3OBa+dsF3HoXbWxAk1i5WsOmuNNY9UkWzX9N+ru6gdniWhQ0KuCjaiJk0FHROao3yAx7ZmZW49jIn0y/TeN4T1+M67xecWfrvmZIyqXc5gBdg3VIrlGYn7aStIt10FrzZUtguhYyAJNZuBQGB6sg== --e89a8f83a163486bb104ca78c0ff Content-Type: text/plain; charset=ISO-8859-1 I added a Executors.newCachedThreadPool() to PluginManager, and it greatly improved performance of async tasks. I'm now wondering - is there any reason to not put this in CordovaInterface and have an app-wide thread-pool? Other than wanting to give threads a name, I can't think of why you'd ever want to create a new thread instead of using a thread pool... --e89a8f83a163486bb104ca78c0ff--