Slow ESV compilation in jar mode
jar mode:
... 13:26 | INFO | stderr - [ strj | warning ] No Stratego files found in directory 'C:\Program-Files-Custom\Spoofax-windows-x64-20161014\plugins\org.metaborg.meta.nabl2.shared.eclipse_2.1.0.20161014-150749-master\target\unpacked\latest\src-gen/signatures/nabl2/shared'! 13:27 | INFO | .m.s.m.c.b.LanguageSpecBuilder - Compiling Main ESV file eclipse:///icedust2/editor/Main.esv 13:27 | INFO | o.m.c.build.Builder - Building eclipse:///icedust2 13:27 | INFO | o.m.c.build.Builder - Building 1 sources, 45 includes of language impl. org.metaborg:org.metaborg.meta.lang.esv:2.1.0-SNAPSHOT // this is slow (it takes about a minute) 13:28 | INFO | o.m.s.e.m.b.PackageBuilder - Packaging language project eclipse:///icedust2 13:28 | INFO | Build log - > Copy '.+\.(?:tbl|pp\.af)' from src-gen\stratego-java\icedust2\trans to target\classes\icedust2\trans 13:28 | INFO | Build log - > Package language implementation 13:28 | INFO | Build log - > Creating JAR file 13:28 | INFO | Build log - > Creating JAR file 13:28 | INFO | o.m.s.e.m.b.PackageBuilder - Archiving language project eclipse:///icedust2 13:28 | INFO | Build log - > Archive language implementation 13:28 | INFO | o.m.s.e.m.b.PackageBuilder - Reloading language project eclipse:///icedust2
ctree mode:
... 13:34 | INFO | stderr - [ strj | warning ] No Stratego files found in directory 'C:\Program-Files-Custom\Spoofax-windows-x64-20161014\plugins\org.metaborg.meta.nabl2.shared.eclipse_2.1.0.20161014-150749-master\target\unpacked\latest\src-gen/signatures/nabl2/shared'! 13:35 | INFO | Build log - > Generate typesmart analysis 13:35 | WARN | Typesmart - Could not extract typesmart info for unresolvable import signatures/nabl2/shared/- 13:35 | WARN | Typesmart - Could not extract typesmart info for unresolvable import signatures/nabl2/runtime/- 13:35 | INFO | .m.s.m.c.b.LanguageSpecBuilder - Compiling Main ESV file eclipse:///icedust2/editor/Main.esv 13:35 | INFO | o.m.c.build.Builder - Building eclipse:///icedust2 13:35 | INFO | o.m.c.build.Builder - Building 1 sources, 45 includes of language impl. org.metaborg:org.metaborg.meta.lang.esv:2.1.0-SNAPSHOT // this is fast 13:35 | INFO | o.m.s.e.m.b.PackageBuilder - Packaging language project eclipse:///icedust2 13:35 | INFO | Build log - > Package language implementation 13:35 | INFO | Build log - > Creating JAR file 13:35 | INFO | o.m.s.e.m.b.PackageBuilder - Archiving language project eclipse:///icedust2 13:35 | INFO | Build log - > Archive language implementation 13:35 | INFO | o.m.s.e.m.b.PackageBuilder - Reloading language project eclipse:///icedust2
Eclipse: org.eclipse.platform.ide 4.6.1.M20160907-1200 Spoofax: org.metaborg.spoofax.eclipse 2.1.0.20161014-150749-master System: Windows 10 amd64 10.0
(update, latest version same problem)
Eclipse: org.eclipse.platform.ide 4.6.1.M20160907-1200 Spoofax: org.metaborg.spoofax.eclipse 2.1.0.20161020-125857-master System: Windows 10 amd64 10.0
Is there a reason for ESV build to be slow in jar mode?
(offtopic: there is on typesmart in jar mode?)
Submitted by Daco Harkes on 21 October 2016 at 13:39
Issue Log
another project (using NaBL1 instead of NaBL2) in jar mode:
13:58 | INFO | Build log - Execute strj -i C:\Users\Daco\Documents\IceDust\icedust\trans\icedust.str -o C:\Users\Daco\Documents\IceDust\icedust\src-gen\stratego-java\icedust\trans\Main.java -p icedust.trans --library --clean -I C:\Users\Daco\Documents\IceDust\icedust\lib -I C:\Users\Daco\Documents\IceDust\icedust\src-gen -I C:\Users\Daco\Documents\IceDust\icedust -I C:\Users\Daco\Documents\IceDust\icedust\trans -I C:\Program-Files-Custom\Spoofax-windows-x64-20161014\plugins\meta.lib.spoofax.eclipse_2.1.0.20161014-150749-master\target\unpacked\latest\trans -I C:\Program-Files-Custom\Spoofax-windows-x64-20161014\plugins\org.metaborg.meta.lib.analysis.eclipse_2.1.0.20161014-150749-master\target\unpacked\latest\trans --cache-dir C:\Users\Daco\Documents\IceDust\icedust\target\stratego-cache -la stratego-lib -la stratego-sglr -la stratego-gpp -la stratego-xtc -la stratego-aterm -la stratego-sdf -la strc -la java-front -la icedust.strategies 13:59 | INFO | Build log - > Generate typesmart analysis 13:59 | INFO | .m.s.m.c.b.LanguageSpecBuilder - Compiling Main ESV file eclipse:///icedust/editor/Main.esv 13:59 | INFO | o.m.c.build.Builder - Building eclipse:///icedust 13:59 | INFO | o.m.c.build.Builder - Building 1 sources, 2 includes of language impl. org.metaborg:org.metaborg.meta.lang.esv:2.1.0-SNAPSHOT // also takes about 30 seconds 14:00 | INFO | o.m.s.e.m.b.PackageBuilder - Packaging language project eclipse:///icedust 14:00 | INFO | Build log - > Package language implementation 14:00 | INFO | Build log - > Copy '.+\.(?:tbl|pp\.af)' from src-gen\stratego-java\icedust\trans to target\classes\icedust\trans 14:00 | INFO | Build log - > Creating JAR file 14:00 | INFO | Build log - > Creating JAR file 14:00 | INFO | o.m.s.e.m.b.PackageBuilder - Archiving language project eclipse:///icedust 14:00 | INFO | Build log - > Archive language implementation 14:00 | INFO | o.m.s.e.m.b.PackageBuilder - Reloading language project eclipse:///icedust
In ctree mode, this project ESV build is fast as well.
It is noticably faster on OSX, just takes 10 seconds instead of a full minute. (Though 10 seconds still seems slow for this step.)
Eclipse: org.eclipse.platform.ide 4.6.1.M20160907-1200 Spoofax: org.metaborg.spoofax.eclipse 2.1.0.20161017-185049-master System: Mac OS X x86_64 10.11.6
Incremental build has same issue
16:46 | INFO | s.e.m.b.GenerateSourcesBuilder - Generating sources for language project eclipse:///icedust2 16:46 | INFO | o.m.c.build.Builder - Building eclipse:///icedust2 16:46 | INFO | o.m.c.build.Builder - Building 1 sources, 0 includes of language impl. org.metaborg:org.metaborg.meta.lang.esv:2.1.0-SNAPSHOT 16:46 | INFO | o.m.s.e.m.b.CompileBuilder - Building language project eclipse:///icedust2 16:46 | INFO | .m.s.m.c.b.LanguageSpecBuilder - Compiling Main ESV file eclipse:///icedust2/editor/Main.esv 16:46 | INFO | o.m.c.build.Builder - Building eclipse:///icedust2 16:46 | INFO | o.m.c.build.Builder - Building 1 sources, 45 includes of language impl. org.metaborg:org.metaborg.meta.lang.esv:2.1.0-SNAPSHOT // takes 45-60 seconds on Windows / 15 seconds on OSX 16:47 | INFO | o.m.s.e.m.b.PackageBuilder - Packaging language project eclipse:///icedust2 16:47 | INFO | o.m.s.e.m.b.PackageBuilder - Archiving language project eclipse:///icedust2 16:47 | INFO | Build log - > Archive language implementation 16:47 | INFO | o.m.s.e.m.b.PackageBuilder - Reloading language project eclipse:///icedust2
The Tiger language project has similar behavior (1 sec with ctree, ~8 sec with jar).
18:48 | INFO | o.m.c.build.Builder - Building 1 sources, 45 includes of language impl. org.metaborg:org.metaborg.meta.lang.esv:2.1.0-SNAPSHOT
Eclipse: org.eclipse.platform.ide 4.6.1.M20160907-1200 Spoofax: org.metaborg.spoofax.eclipse 2.1.0.20161020-125857-master System: Mac OS X x86_64 10.11.6
It’s not compilation that is slow, it is the dynamic dependency analysis of Pluto that takes up some time. You should always confirm the source of performance problems with a profiler, or using the
jps
andjstack
commands to dump a stack trace of every thread at the moment it seems slow.We already sped up the dynamic dependency analysis a lot by using a database instead of the Java preference store, so we’re not sure how we can make it even faster. One thing you could try, is deleting your
~/.pluto
directory to clear all dependency data.
Log in to post comments