You cannot build the TypeOracle using the class bytes using the
classpath only, because of the re-rooted resources which have no
compiled classes near the source file. So, as part of the GWT Designer I
implemented disk caching of the compiled CompilationUnits. The CU caught
after compiling and it's class (and inner classes) bytes and JSNI code
stored on disk in single file per class. Then, when new session starts
up the cache loads as CachedCompilationUnit and no compilation occurred
at all (except generated resources of course). This gives us 2-3 times
faster startup of the dev mode.

Now, it slow in the building of the TypeOracle itself. For this is the
idea to prepare the TypeOracles from classpath (ex., one per JAR file)
and then share them between sessions. This requires delegating
TypeOracle which consists of several shared TypeOracles (in this case
the recent refactoring of the TypeOracle as interface is very suitable,
I did the same by myself but I'll use the Scott's version; additionally,
I did some refactoring of the CompiledClassLoader to remove the
DispatchIdOracle (and related) from it).

--
Alexander Mitin,
GWT Designer Developer

On 2010/12/06 19:48:18, zundel wrote:
This change is not all the way ready for review, but I wanted some
feedback on
the testing portion.

The overall aim of this change is to isolate the part of building the
type
oracle that relies on running the JDT compiler from the part that
builds the
type oracle from bytecode.

The idea is to show that loading the type oracle using classbytes from
the
classpath is the same as compiling source code with JDT and taking the
classbytes from there.  To do that, I created new source files with
the same
data as in the TypeOracleMediatorTest resources, then look up the
bytecode using
the class loader for those classes.

The only test I've modified is testAssimilation().  I wanted to run
the same
test on both the source and bytecode build type oracle.  I'm not
really happy
with it and am looking for fresh ideas.



http://gwt-code-reviews.appspot.com/1188802/show

--
http://groups.google.com/group/Google-Web-Toolkit-Contributors

Reply via email to