This sounds great Andrea; and much better then what mbedward and myself were 
considering.
When you have committed can we grab some build advice for the developers guide? 
(what profiles; ant; etc...)


-- 
Jody Garnett

On Sunday, 15 May 2011 at 7:34 PM, Andrea Aime wrote: 
> Hi,
> this morning I wanted to edit the unsupported modules rst pages and
> ended up going through the geotools docs build process for the first time.
> 
> Run mvn install in the docs module and saw sphinx process through 4
> different documentation sets, building everything from scratch. 1 minute 
> build.
> Run mvn install again and it started over from stratch, again one minute!
> Holy inefficient build Batman!
> 
> First observation:
> - when you do mvn install in any java module it will recompile only the
>  files that changed since the last build, not _everything_
> - if you want to recompile everything just do a mvn clean install instead
> 
> Found out this was due to the param given to sphinx, forcing it to
> reinspect and re-evaluate everything. Oh boy, why why?
> Removed those, got the build going down from 60+ seconds to 7-8
> seconds. Much better, if I modify a single file it will rebuild just
> that one.
> 
> Still, it is still a far cry away from the almost instant doc re-build we
> have in GeoServer using makefiles.
> 
> Then noticed the packaging of the module was "jar", which resulted in
> building a source jar nobody would end up using. Moved packaging
> to pom, same result, one less jar around, one second less in the build.
> 
> Still, the thing is doing too much, if I want to work on the user docs
> why insist on rebuilding everything else?
> Refactored the pom and ant file to allow building a single sub-section
> of the docs via a profile:
> 
> mvn install -Puser
> 
> Better, but still 6 second long build. Why oh why? Well, because maven
> has a large startup time. But Ant doesn't, and most of the work is done
> by Ant.
> 
> So refactored a little more the build.xml to be able to run it directly
> if ant is available on the machine.
> 
> ant user
> Buildfile: /home/aaime/devel/git-gt/docs/build.xml
> 
> init:
>  [echo] Build directory is /home/aaime/devel/git-gt/docs/target
> and project version is 8.0-M0
> 
> user:
> 
> sphinx:
>  [echo] Running sphinx-build -D release=8.0-M0 -b html -d
> "/home/aaime/devel/git-gt/docs/target/user/doctrees" .
> "/home/aaime/devel/git-gt/docs/target/user/html"
>  [exec] Running Sphinx v1.0.7
>  [exec] loading pickled environment... done
>  [exec] building [html]: targets for 0 source files that are out of date
>  [exec] updating environment: 0 added, 0 changed, 0 removed
>  [exec] looking for now-outdated files... none found
>  [exec] no targets are out of date.
> 
> BUILD SUCCESSFUL
> Total time: 0 seconds
> 
> Aaah, now we're talking. If one really wants to start fresh and
> rebuild everything user related
> instead just run "ant clean user", easy peasy.
> 
> Maven remains there for those that do not have Ant around and for the
> main build, but whoever else
> can enjoy a faster doc dev cycle with the modifications I've cooked.
> 
> Now, I did not commit them still because I don't know if there is a
> specific reason for the current
> build process.
> 
> Can people review and tell me if it's acceptable to go on and commit
> the patch attached to this mail?
> 
> Cheers
> Andrea
> 
> -- 
> -------------------------------------------------------
> Ing. Andrea Aime
> GeoSolutions S.A.S.
> Tech lead
> 
> Via Poggio alle Viti 1187
> 55054 Massarosa (LU)
> Italy
> 
> phone: +39 0584 962313
> fax: +39 0584 962313
> 
> http://www.geo-solutions.it
> http://geo-solutions.blogspot.com/
> http://www.youtube.com/user/GeoSolutionsIT
> http://www.linkedin.com/in/andreaaime
> http://twitter.com/geowolf
> 
> -------------------------------------------------------
> ------------------------------------------------------------------------------
> Achieve unprecedented app performance and reliability
> What every C/C++ and Fortran developer should know.
> Learn how Intel has extended the reach of its next-generation tools
> to help boost performance applications - inlcuding clusters.
> http://p.sf.net/sfu/intel-dev2devmay
> _______________________________________________
> Geotools-devel mailing list
> Geotools-devel@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/geotools-devel
> 
> Attachments: 
> - docs.patch
> 
> 

------------------------------------------------------------------------------
Achieve unprecedented app performance and reliability
What every C/C++ and Fortran developer should know.
Learn how Intel has extended the reach of its next-generation tools
to help boost performance applications - inlcuding clusters.
http://p.sf.net/sfu/intel-dev2devmay
_______________________________________________
Geotools-devel mailing list
Geotools-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/geotools-devel

Reply via email to