groovy-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Jochen Theodorou <blackd...@gmx.org>
Subject Re: [PROPOSAL]Provide an option to generate stubs in in-momery file system for better compiling performance
Date Sat, 19 Jan 2019 12:58:43 GMT
The only minus on this is the memory consumption... though I did not 
measure it, so maybe it is not that bad.

On 18.01.19 09:44, Daniel Sun wrote:
> Hi all,
> 
> [Background]
>         Groovy's joint compiler will generate a lot of stubs for groovy
> source files, many of the stubs are useless and written to disk and clean
> later. When project contains a lot of groovy source files, the performance
> of compiling is not good.
> 
> [Proposal]
>        I propose to add an option(e.g. `groovy.generate.stubs.in.memory`) to
> generate stubs in in-momery file system[1]. We can get the generated stub
> files from the the in-memory file system with `StandardJavaFileManager`[2] .
> Here is the `JavaCompiler` usage[3].
> 
> [Benefits]
>       We can avoid writing lots of stub files to disk and subsequent
> cleaning, in addition, reading stub files from memory will be much faster
> than reading from disk.
> 
> 
>        Any thoughts?
> 
> Cheers,
> Daniel.Sun
> [1] https://github.com/google/jimfs
> [2]
> https://docs.oracle.com/javase/7/docs/api/javax/tools/StandardJavaFileManager.html
> [3]
> https://github.com/danielsun1106/SmartASMifier/blob/master/SmartASMifier.groovy#L81-L88
> 
> 
> 
> 
> --
> Sent from: http://groovy.329449.n5.nabble.com/Groovy-Dev-f372993.html
> 


Mime
View raw message