From dev-return-4904-archive-asf-public=cust-asf.ponee.io@groovy.apache.org Fri May 25 15:02:40 2018 Return-Path: X-Original-To: archive-asf-public@cust-asf.ponee.io Delivered-To: archive-asf-public@cust-asf.ponee.io Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by mx-eu-01.ponee.io (Postfix) with SMTP id 2A7A9180627 for ; Fri, 25 May 2018 15:02:39 +0200 (CEST) Received: (qmail 79780 invoked by uid 500); 25 May 2018 13:02:39 -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 79763 invoked by uid 99); 25 May 2018 13:02:38 -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; Fri, 25 May 2018 13:02:38 +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 C6241CF401 for ; Fri, 25 May 2018 13:02:37 +0000 (UTC) X-Virus-Scanned: Debian amavisd-new at spamd1-us-west.apache.org X-Spam-Flag: NO X-Spam-Score: 0.092 X-Spam-Level: X-Spam-Status: No, score=0.092 tagged_above=-999 required=6.31 tests=[DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, HTML_MESSAGE=2, RCVD_IN_DNSWL_NONE=-0.0001, RCVD_IN_MSPIKE_H2=-1.797, SPF_PASS=-0.001, T_DKIMWL_WL_MED=-0.01] autolearn=disabled Authentication-Results: spamd1-us-west.apache.org (amavisd-new); dkim=pass (2048-bit key) header.d=gmail.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 17OhzE5ZozyO for ; Fri, 25 May 2018 13:02:35 +0000 (UTC) Received: from mail-io0-f175.google.com (mail-io0-f175.google.com [209.85.223.175]) by mx1-lw-us.apache.org (ASF Mail Server at mx1-lw-us.apache.org) with ESMTPS id 868895F39F for ; Fri, 25 May 2018 13:02:35 +0000 (UTC) Received: by mail-io0-f175.google.com with SMTP id a10-v6so6275158ioc.9 for ; Fri, 25 May 2018 06:02:35 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to; bh=xIIHeCFtsjA0ur44uZalsWSxD0MEjhpyUPzpekb5Vo8=; b=pcF0sK8Z+f4GDV7sWN/0Podb8WhTwavxtzc8x0QHMh6a2/eVZGoLIqVWogikq8cPwz kmVK1diE9nCX4EL7T6V1YBqv2+7hIuH6AXN7jHpYFanUhN2aVvK2n4NkXgH4i+rVaeIl zL9+lICa1ZrGxZVfyhecXZyBxztJAr/bdQ+xut7WJQE7y0QQG6R+hxzivxTKl1WoNUMH CUVWuyiek/KWuyVo7joGu36Gc2fK1sMwqqZY1G7OLYcEa8xzroWm1Vc9luv3Qt0j0c2n +DccXAwGU/+odFBpzyFYPkRSrdZpwzRcc5zEW0iW+YjSZ5phfp3efZnQzenmrdWcnDNY fFJQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to; bh=xIIHeCFtsjA0ur44uZalsWSxD0MEjhpyUPzpekb5Vo8=; b=XiiZeif04B7cw0qEE3vI1aCOlRbd0PxPQaNDC+Zv9+HRmXAjWsd/rQNH9aFleATaAP c9TJssiZaaUSFtOwIfJdWDsL4jdB8cE6iLfU71gVNowTCLM0KlFRSr2dq2RmgdAHhD09 oSQE/tMmcrQz8NtXbeYaVwmprxIEa4KzhCxnED0xznaDYHzB31YFzCQCZi+GsjvfOOXv 2YtmJqscFG1qYdUhR264HbIiEU8b5xtLNSpDHbP7423yKu+bDt0X1M5WlxakfT3n0qoa mpA8oWCboWm56Xx1fGA42bgJ0pdcMgrjIeX63uiFo70BcPEgPRmcujk15G3H4yobWQu/ M/vw== X-Gm-Message-State: ALKqPwffXfIhO015iN6s+eMfsX05HwAbRAs3rsguRkz6g+PkO2e/12DZ Sjdwu2fUo3Jx+NGLoE6Zah40ojOBa6GAnioGGWBvOw== X-Google-Smtp-Source: AB8JxZp25ymPqxXz7lYCD4f4sSmxNB4qPvL+o+OfLHCV57T010ZOB5e0gc9RVDTp+StoSbqMUE4sMTTEJBJ6F/YjNNM= X-Received: by 2002:a6b:2251:: with SMTP id i78-v6mr1804209ioi.276.1527253345940; Fri, 25 May 2018 06:02:25 -0700 (PDT) MIME-Version: 1.0 References: <1527236242181-0.post@n5.nabble.com> <1527245471913-0.post@n5.nabble.com> In-Reply-To: From: =?UTF-8?Q?C=C3=A9dric_Champeau?= Date: Fri, 25 May 2018 15:02:13 +0200 Message-ID: Subject: Re: Performance of the compiler To: dev@groovy.apache.org Content-Type: multipart/alternative; boundary="0000000000002acfab056d076147" --0000000000002acfab056d076147 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable The problem is not the performance of the test, it's the performance of _compiling_ the test. @CompileStatic wouldn't help there. Le ven. 25 mai 2018 =C3=A0 14:24, Thibault Kruse = a =C3=A9crit : > Would the test performance be improved if @CompileStatic were used? I > think gradle uses Spock, and last time I checked Spock could not be > used with @CompileStatic. But Spock could also be removed with some > effort... > > On Fri, May 25, 2018 at 8:52 PM, Jochen Theodorou > wrote: > > > > > > Am 25.05.2018 um 12:51 schrieb Daniel.Sun: > >> > >> Hi C=C3=A9dric, > >> > >> I am not going to cache ClassNode instance(just cache class name= s, > >> which are `String`), but I want to add a check whether the name of the > >> ClassNode being resolved is possibly in the default imported packages, > >> e.g. > >> If a ClassNode instance's name is `Foobar`(apparently it could not be = in > >> any > >> default imported packages), then we can `return false` immediately and > the > >> further resolving can be eliminated. > > > > > > but this means we will have to manually update the list for java.lang, > > java.util, java.io and java.net > > > > Take for example Module. It is new in Java 9 and is in java.lang. If we > had > > this logic already in say Groovy 2.0 I am pretty sure the last versions > till > > Groovy 2.3 would not be able to resolve this class anymore then. > > > > I think there would be no problem with Java10, but think of Java 11... > we do > > not know yet. > > > > bye Jochen > --0000000000002acfab056d076147 Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable
The problem is not the performance of the test, it's t= he performance of _compiling_ the test. @CompileStatic wouldn't help th= ere.

Le=C2=A0ven. = 25 mai 2018 =C3=A0=C2=A014:24, Thibault Kruse <tibokruse@googlemail.com> a =C3=A9crit=C2=A0:
=
Would the test performance be improved= if @CompileStatic were used? I
think gradle uses Spock, and last time I checked Spock could not be
used with @CompileStatic. But Spock could also be removed with some
effort...

On Fri, May 25, 2018 at 8:52 PM, Jochen Theodorou <blackdrag@gmx.org> wrote:
>
>
> Am 25.05.2018 um 12:51 schrieb Daniel.Sun:
>>
>> Hi C=C3=A9dric,
>>
>>=C2=A0 =C2=A0 =C2=A0 =C2=A0I am not going to cache ClassNode instan= ce(just cache class names,
>> which are `String`), but I want to add a check whether the name of= the
>> ClassNode being resolved is possibly in the default imported packa= ges,
>> e.g.
>> If a ClassNode instance's name is `Foobar`(apparently it could= not be in
>> any
>> default imported packages), then we can `return false` immediately= and the
>> further resolving can be eliminated.
>
>
> but this means we will have to manually update the list for java.lang,=
> java.util, java.io and java.net
>
> Take for example Module. It is new in Java 9 and is in java.lang. If w= e had
> this logic already in say Groovy 2.0 I am pretty sure the last version= s till
> Groovy 2.3 would not be able to resolve this class anymore then.
>
> I think there would be no problem with Java10, but think of Java 11...= we do
> not know yet.
>
> bye Jochen
--0000000000002acfab056d076147--