You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@lucene.apache.org by "Robert Muir (Jira)" <ji...@apache.org> on 2021/03/26 03:34:00 UTC

[jira] [Commented] (LUCENE-9879) errorprone cause large slowdown of compileJava/compileTestJava

    [ https://issues.apache.org/jira/browse/LUCENE-9879?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17309136#comment-17309136 ] 

Robert Muir commented on LUCENE-9879:
-------------------------------------

In an ideal world I think, we'd let javac do compileJava/compileTestJava fast and let precommit run separate ecj lint, with errorprone hooked into the ECJ compile.

But it seems this is not possible: https://errorprone.info/docs/installation#eclipse

Nevertheless, I think its wrong to slow down the compile/test/debug loop of the build so much. So IMO if this checker has value, we should turn on and enable the checks, and consider adding it as a separate pass to precommit, even if it means adding adding additional time there.

> errorprone cause large slowdown of compileJava/compileTestJava
> --------------------------------------------------------------
>
>                 Key: LUCENE-9879
>                 URL: https://issues.apache.org/jira/browse/LUCENE-9879
>             Project: Lucene - Core
>          Issue Type: Task
>            Reporter: Robert Muir
>            Priority: Major
>
> Errorprone hooks itself into the java compiler (compileJava/compileTestJava). So this static analysis runs, even if you are just recompiling to run tests.
> It causes javac to run 3x slower at the moment.
> With errorprone:
> {noformat}
> 188.26 sec.  compileTestJava
> 180.24 sec.  compileJava
> {noformat}
> Without errorprone:
> {noformat}
>   52.54 sec.  compileTestJava
>   49.26 sec.  compileJava
> {noformat}
> The worst part is: if you look at the config, essentially all error-prone checks are disabled. So we aren't getting value out of it, and it slows builds significantly. 
> I'd like to have a discussion about it:
> * should we keep it enabled?
> * should it really hook into compileJava/compileTests or maybe be a separate task (e.g. precommit only)
> I'm raising this because it is so slow, that e.g. Uwe mentioned on other issues the possibility of switching to ECJ compiler to try to speed up builds, but, it turns out javac is actually fast. The slowness is error-prone.
> For sure if we are going to use it, I'd like to at least turn on checks and get value out of the thing. But it is unclear to me how many of these checks aren't already met by javac or ecj (which frankly, we still haven't enabled to do good analysis yet, although the situation is improving)
> cc [~uschindler] [~dweiss]



--
This message was sent by Atlassian Jira
(v8.3.4#803005)

---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@lucene.apache.org
For additional commands, e-mail: issues-help@lucene.apache.org