remove unneeded copying of compiled classes content;

clear mappings mem caches a the end of every chunk build
This commit is contained in:
Eugene Zhuravlev
2012-03-07 15:48:38 +04:00
parent d2b196aac6
commit 8d9e592a45
3 changed files with 3 additions and 14 deletions
@@ -217,6 +217,7 @@ public class CompileContext extends UserDataHolderBase implements MessageHandler
void onChunkBuildComplete(@NotNull ModuleChunk chunk) throws IOException {
myDataManager.closeSourceToOutputStorages(chunk, isCompilingTests());
myDataManager.flush(true);
myFsState.clearContextRoundData();
myFsState.clearContextChunk();
@@ -509,16 +509,6 @@ public class JavaBuilder extends ModuleLevelBuilder {
urls[index++] = getResourcePath(GridConstraints.class).toURI().toURL(); // forms_rt.jar
//urls.add(getResourcePath(CellConstraints.class).toURI().toURL()); // jgoodies-forms
final Map<String, byte[]> compiled = new HashMap<String, byte[]>();
for (OutputFileObject fileObject : outputSink.getFileObjects()) {
final String name = fileObject.getClassName();
if (name != null) {
final OutputFileObject.Content content = fileObject.getContent();
if (content != null) {
compiled.put(name, content.toByteArray());
}
}
}
return new InstrumentationClassFinder(platformUrls, urls, outputSink);
}
@@ -1836,10 +1836,8 @@ public class Mappings {
// flush if you own the context
final DependencyContext context = myContext;
if (context != null) {
if (memoryCachesOnly) {
context.clearMemoryCaches();
}
else {
context.clearMemoryCaches();
if (!memoryCachesOnly) {
context.flush();
}
}