mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-27 10:03:11 +07:00
remove unneeded copying of compiled classes content;
clear mappings mem caches a the end of every chunk build
This commit is contained in:
@@ -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();
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user