roterdam / crystalsaf

Automatically exported from code.google.com/p/crystalsaf
0 stars 0 forks source link

AnnotatedTest is slow when many compilation units are in open projects #13

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
Starting a JUnit Plugin test using AnnotatedTest is very slow when the open
projects in the child eclipse contain many files.  The reason seems to be
that AnnotatedTest scans all of them in their entirety for test annotations
(@PassingTest, @FailingTest, @UseAnalyses).  Could limit the scan to the
top-level type declaration(s) and/or stop scanning when annotations were found.

Original issue reported on code.google.com by kevin.bi...@gmail.com on 29 Sep 2008 at 6:11

GoogleCodeExporter commented 9 years ago
With r131, limited the AST visitor to annotations on top-level types, but it's 
still
pretty slow when there's a lot of classes in open projects in the workspace (700
classes -> about a minute until tests are actually run).  I'm suspecting this 
is due
to the overhead of just parsing all the comp units, which also slows down 
Crystal's
annotation pre-processing when manually running it on many comp units at a 
time. 
Maybe there's a way of looking at the annotations through the Java model 
interface,
rather than parsing all comp units?

Original comment by kevin.bi...@gmail.com on 14 Feb 2009 at 4:44

GoogleCodeExporter commented 9 years ago
For a while now, AnnotatedTest first looks at the Java model to see if 
UseAnalysis annotations are in sight before parsing the compilation unit to 
make sure.  This can still get somewhat slow but is usually fine, so let's 
close this until need arises.

Original comment by kevin.bi...@gmail.com on 4 Jan 2011 at 12:44