Setting up build caching in gradle.properties has helped a lot too, just
fyi.  Thanks.

org.gradle.caching=true
org.gradle.caching.debug=true


On Fri, Aug 24, 2018 at 8:59 AM Lukas Eder <[email protected]> wrote:

> Thanks a lot for the feedback. That's already something - the feature is
> rather optional. Given that there's a significant improvement, it can
> definitely be skipped...
>
> Thanks,
> Lukas
>
> On Thu, Aug 23, 2018 at 8:45 PM Asif Rahman <
> [email protected]> wrote:
>
>> Thanks Lukas,
>>
>> I re-ran codegen with the recordsImplementingRecordN flag set to false,
>> saved about 20-30 seconds.  Overall still about ~4:30 min.
>>
>> Thanks
>>
>>
>> Task Duration Result
>> : 6m9.56s (total)
>> :compileJava 4m20.20s
>> :test 40.153s
>> :bootJar 35.250s
>> :clean 29.485s
>> :compileTestJava 4.368s
>> :processResources 0.098s
>> :processTestResources 0.004s NO-SOURCE
>> :assemble 0.001s Did No Work
>> :testClasses 0.001s Did No Work
>> :build 0s Did No Work
>> :check 0s Did No Work
>> :classes 0s Did No Work
>> :jar 0s SKIPPED
>>
>>
>> On Thu, Aug 23, 2018 at 6:41 AM Lukas Eder <[email protected]> wrote:
>>
>>> Hi Asif,
>>>
>>> Thanks for your message and for your update. Indeed, incremental
>>> building is definitely recommended with jOOQ generated classes. The code
>>> generator will only touch generated code if it has been modified, leaving
>>> the file timestamps alone otherwise. Incremental compilers can pick up on
>>> this and optimise their second compilation run.
>>>
>>> Note also that jOOQ 3.10 introduced a new code generation configuration
>>> flag called <recordsImplementingRecordN/>:
>>> https://github.com/jOOQ/jOOQ/issues/6072
>>>
>>> Setting this to false will remove the Record1, Record2, ... Record22
>>> super type declarations from generated records. In larger schemas, removing
>>> these can definitely improve compilation speeds due to the amount of
>>> generic type information that can be avoided. Would be curious to see your
>>> updated clean build and incremental build times if you set that flag to
>>> false
>>>
>>> Thanks,
>>> Lukas
>>>
>>> On Wed, Aug 22, 2018 at 10:48 PM <[email protected]>
>>> wrote:
>>>
>>>> This is no longer an issue for me, guess it was really a gradle
>>>> question, unrelated to jooq.  After I enabled incremental compile on the
>>>> gradle config file with
>>>>
>>>> apply plugin: 'java'
>>>>
>>>> tasks.withType(JavaCompile) {
>>>>     //enable compilation in a separate daemon process
>>>>     options.fork = true
>>>>
>>>>     //enable incremental compilation
>>>>     options.incremental = true
>>>> }
>>>>
>>>>
>>>> Only a gradle clean build takes 5+ minutes.  I can live with that.  Now
>>>> it looks like this on incremental compile
>>>>
>>>> Task Duration Result
>>>> : 1m24.65s (total)
>>>> :bootJar 36.972s
>>>> :test 36.479s
>>>> :compileJava 9.444s
>>>> :compileTestJava 1.723s UP-TO-DATE
>>>> :processResources 0.030s UP-TO-DATE
>>>> :processTestResources 0.002s NO-SOURCE
>>>> :classes 0.001s Did No Work
>>>> :testClasses 0.001s UP-TO-DATE
>>>> :assemble 0s Did No Work
>>>> :build 0s Did No Work
>>>> :check 0s Did No Work
>>>> :jar 0s SKIPPED
>>>>
>>>>
>>>> Thanks.
>>>>
>>>>
>>>> On Wednesday, August 22, 2018 at 2:38:19 PM UTC-4,
>>>> [email protected] wrote:
>>>>>
>>>>>
>>>>> Hi,
>>>>>
>>>>> I have seen an older thread with slow JOOQ compile time as of v3.8.x (
>>>>> https://groups.google.com/forum/#!topic/jooq-user/vuaG9d9krDk).  It
>>>>> seems like that specific issue is now closed.
>>>>>
>>>>> There were about 3500 .java files generated from codegen.  When I run
>>>>> gradle build on that javaCompile is taking about 5 minutes (running 
>>>>> without
>>>>> --profile option takes about same time).
>>>>>
>>>>> >gradle build --profile --parallel
>>>>>
>>>>> Task Duration Result
>>>>> : 6m6.05s (total)
>>>>> :compileJava 4m48.67s
>>>>> :bootJar 36.223s
>>>>> :test 35.138s
>>>>> :compileTestJava 5.703s
>>>>> :processResources 0.302s UP-TO-DATE
>>>>> :processTestResources 0.016s NO-SOURCE
>>>>> :classes 0.001s Did No Work
>>>>> :assemble 0s Did No Work
>>>>> :build 0s Did No Work
>>>>> :check 0s Did No Work
>>>>> :jar 0s SKIPPED
>>>>> :testClasses 0s Did No Work
>>>>>
>>>>>
>>>>> As additional optimizations I ran gradle with --parallel and increased
>>>>> the memory in gradle.properties to
>>>>> org.gradle.jvmargs=-Xmx2048m -XX:MaxPermSize=512m
>>>>> -XX:+HeapDumpOnOutOfMemoryError -Dfile.encoding=UTF-8
>>>>>
>>>>> Any other suggestions?
>>>>>
>>>>> Thanks!
>>>>>
>>>>> --
>>>> You received this message because you are subscribed to the Google
>>>> Groups "jOOQ User Group" group.
>>>> To unsubscribe from this group and stop receiving emails from it, send
>>>> an email to [email protected].
>>>> For more options, visit https://groups.google.com/d/optout.
>>>>
>>> --
>>> You received this message because you are subscribed to a topic in the
>>> Google Groups "jOOQ User Group" group.
>>> To unsubscribe from this topic, visit
>>> https://groups.google.com/d/topic/jooq-user/2Danfh893bM/unsubscribe.
>>> To unsubscribe from this group and all its topics, send an email to
>>> [email protected].
>>> For more options, visit https://groups.google.com/d/optout.
>>>
>> --
>> You received this message because you are subscribed to the Google Groups
>> "jOOQ User Group" group.
>> To unsubscribe from this group and stop receiving emails from it, send an
>> email to [email protected].
>> For more options, visit https://groups.google.com/d/optout.
>>
> --
> You received this message because you are subscribed to a topic in the
> Google Groups "jOOQ User Group" group.
> To unsubscribe from this topic, visit
> https://groups.google.com/d/topic/jooq-user/2Danfh893bM/unsubscribe.
> To unsubscribe from this group and all its topics, send an email to
> [email protected].
> For more options, visit https://groups.google.com/d/optout.
>

-- 
You received this message because you are subscribed to the Google Groups "jOOQ 
User Group" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
For more options, visit https://groups.google.com/d/optout.

Reply via email to