Return-Path: X-Original-To: archive-asf-public-internal@cust-asf2.ponee.io Delivered-To: archive-asf-public-internal@cust-asf2.ponee.io Received: from cust-asf.ponee.io (cust-asf.ponee.io [163.172.22.183]) by cust-asf2.ponee.io (Postfix) with ESMTP id A05DF200B35 for ; Tue, 5 Jul 2016 10:06:07 +0200 (CEST) Received: by cust-asf.ponee.io (Postfix) id 9EF4F160A60; Tue, 5 Jul 2016 08:06:07 +0000 (UTC) Delivered-To: archive-asf-public@cust-asf.ponee.io Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by cust-asf.ponee.io (Postfix) with SMTP id E5E53160A4F for ; Tue, 5 Jul 2016 10:06:06 +0200 (CEST) Received: (qmail 16537 invoked by uid 500); 5 Jul 2016 08:06:06 -0000 Mailing-List: contact dev-help@groovy.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@groovy.apache.org Delivered-To: mailing list dev@groovy.apache.org Received: (qmail 16516 invoked by uid 99); 5 Jul 2016 08:06:05 -0000 Received: from pnap-us-west-generic-nat.apache.org (HELO spamd1-us-west.apache.org) (209.188.14.142) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 05 Jul 2016 08:06:05 +0000 Received: from localhost (localhost [127.0.0.1]) by spamd1-us-west.apache.org (ASF Mail Server at spamd1-us-west.apache.org) with ESMTP id 384B4C9AE6 for ; Tue, 5 Jul 2016 08:06:05 +0000 (UTC) X-Virus-Scanned: Debian amavisd-new at spamd1-us-west.apache.org X-Spam-Flag: NO X-Spam-Score: -0.821 X-Spam-Level: X-Spam-Status: No, score=-0.821 tagged_above=-999 required=6.31 tests=[DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, RCVD_IN_DNSWL_LOW=-0.7, RCVD_IN_MSPIKE_H3=-0.01, RCVD_IN_MSPIKE_WL=-0.01, SPF_PASS=-0.001] autolearn=disabled Authentication-Results: spamd1-us-west.apache.org (amavisd-new); dkim=pass (2048-bit key) header.d=googlemail.com Received: from mx1-lw-us.apache.org ([10.40.0.8]) by localhost (spamd1-us-west.apache.org [10.40.0.7]) (amavisd-new, port 10024) with ESMTP id tpCLPfCr5vT5 for ; Tue, 5 Jul 2016 08:06:03 +0000 (UTC) Received: from mail-lf0-f52.google.com (mail-lf0-f52.google.com [209.85.215.52]) by mx1-lw-us.apache.org (ASF Mail Server at mx1-lw-us.apache.org) with ESMTPS id 7C7C95FD0E for ; Tue, 5 Jul 2016 08:06:02 +0000 (UTC) Received: by mail-lf0-f52.google.com with SMTP id q132so129464436lfe.3 for ; Tue, 05 Jul 2016 01:06:02 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=googlemail.com; s=20120113; h=mime-version:from:date:message-id:subject:to :content-transfer-encoding; bh=505vnLvUplsFEWlfYk+knUku1tO1lcBsfcuY5FiOzL0=; b=NVlATdwcLnNCmtWl1fmplkCPyDVV9gpaxgNwrR2k6oZ6ke678zd8OvrsFJBKCqTDT2 1dHvYdVcDFPerB0cqvClH4RfbUSGyuOoqhktg13lwEk8K49zSUPx1KiRkIqnzydwX2Sz SHGQvXdIN+/T51X0yZMHfDIpfEaGL/xZmUd2Or31iI8dIaqIFuNTIiOmHP+TvWTCJitK eK2Gk+0vzIyGxdNJgaa+x+DKxEXu8AdcG2ytHbGWmom8mQc3cJvuH+k7A95JwlJ2Viu4 oEyiLvrYqvph+ygXd6hyY2aXjIYsiwgJrjlh2bSUaV9pvgcyu7unftHc4/WM6JSjVLFi AlKQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:from:date:message-id:subject:to :content-transfer-encoding; bh=505vnLvUplsFEWlfYk+knUku1tO1lcBsfcuY5FiOzL0=; b=BYr7Icobrzt13YB+B7i4SA6q4vQSASC2vWZqs8GiBX4hD3chYVYd5/OIiIif5Ya83h nqhoohLAPNWMV5TE9yJzVYk1H3q8jwam2pE6jPcTChAVQ6IEaIaw6MCH1JokABnh+EJF OtCx6Mqg5aFQYru6Y+Q/fDNXWJgd5rl4p07XAPzfgJx1uQ7cAsI/9Mg/5GYtv+IELAOf wIJL6iVvjE9xE2HFjOnbJtK0c8v8L0OjUjrexpLHMtwdqceHDWsbIoRl91eoUfZF0Xbu hpy2DcIgrYWFXOsnYyWfp+XkXK2HRKV11FckeI0tLXb5mJXmF2JVCx5mcuFoE/3WmEhr tUMw== X-Gm-Message-State: ALyK8tIA5v9aQa43UtF7Q8+qa2QXz7Yc2tpqflx97mIc68XhCKh+Z9QFzfkkos30ZRttvjTvSrrmgM6oD7ugNQ== X-Received: by 10.25.17.92 with SMTP id g89mr3216127lfi.119.1467705959989; Tue, 05 Jul 2016 01:05:59 -0700 (PDT) MIME-Version: 1.0 Received: by 10.25.210.7 with HTTP; Tue, 5 Jul 2016 01:05:59 -0700 (PDT) From: Thibault Kruse Date: Tue, 5 Jul 2016 10:05:59 +0200 Message-ID: Subject: To: dev@groovy.apache.org Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable archived-at: Tue, 05 Jul 2016 08:06:07 -0000 Hi, (I tried sending this mail before, failed so far) This is about using @CompileStatic inside core Groovy code. The analysis of gradle plugins by Cedric revealed a potential problem with dynamic Groovy: http://melix.github.io/blog/2016/05/gradle-kotlin.html "I think at some point, someone made a terrible design decision in Groovy. I don=E2=80=99t know who it was, but the idea was to rely on exceptions to control the flow of resolution of properties. This means that when a property is missing, typically in a closure, an exception is thrown. When a method is not found, an exception is thrown. When a property is not found, an exception is thrown. That seemed to be a good idea, because in the end, you want to provide the user with an error, but in practice, this is catastrophic, because Groovy can capture those exceptions. Typically, in a delegation chain (nested closures), a containing closure or class can actually have this property defined, or implement property missing/method missing. Now, re-think a second about the "simple" example of Gradle build above: how do you now where to look up for message, top, signature, =E2=80=A6? Now you know: f* exceptions are thrown, stack traces are filled, and eventually captured because some composite dynamic object finally wants to answer the message=E2=80=A6 In practice, for some builds I have profiled, it was tens of thousands of exceptions being thrown and stack traces filled for nothing. And that has a terrible impact on performance." Now I am wondering, since parts of Groovy itself are written in Groovy, and @CompileStatic is not much used in side Groovy itself, does core Groovy suffer from performance issues due to the same reasons as well?