http://gwt-code-reviews.appspot.com/1464804/diff/4001/dev/core/src/com/google/gwt/dev/javac/MemoryUnitCache.java File dev/core/src/com/google/gwt/dev/javac/MemoryUnitCache.java (right):
http://gwt-code-reviews.appspot.com/1464804/diff/4001/dev/core/src/com/google/gwt/dev/javac/MemoryUnitCache.java#newcode108 dev/core/src/com/google/gwt/dev/javac/MemoryUnitCache.java:108: public void addArchivedUnit(CompilationUnit newUnit) { On 2011/06/23 15:19:35, jbrosenberg wrote:
Since this method is only ever called from
CompilationStateBuilder.addArchive(),
wouldn't that method be even more centrally located?
That's where I first thought about putting it. I'll think about it some more.
And in that case, since it will be iterating through a list of units, all from the same archive
(which will
presumably all have the same serialization version), it should be able
to exit
more quickly the first time it finds a version mismatch, rather than
having to
iterate through all the units and check each one individually....
Archived units can come from different compiles, (remember -we pull in the previous version of the archive and try to re-use its units?) so it isn't necessarily huge time saver. http://gwt-code-reviews.appspot.com/1464804/diff/4001/dev/core/src/com/google/gwt/dev/javac/MemoryUnitCache.java#newcode109 dev/core/src/com/google/gwt/dev/javac/MemoryUnitCache.java:109: if (((CachedCompilationUnit) newUnit).getTypesSerializedVersion() != GwtAstBuilder On 2011/06/23 15:19:35, jbrosenberg wrote:
This issue goes away if we move this back to CSB.addArchive().
Not sure I see that. addArchive() still works with CompilationUnit type, not CachedCompilationUnit. http://gwt-code-reviews.appspot.com/1464804/ -- http://groups.google.com/group/Google-Web-Toolkit-Contributors
