수요일, 8월 19, 2009

Eclipse 3.4이하에서 MessageConsole 사용하시는 분들 참고하세요.

Eclipse 3.4이하에서 MessageConsole사용하시는 분들 참고 하세요.

MessageConsole.clearConsole()를 사용하고 전체(?) 로그 가져오기 기능을 구현했다고 한다면요.
갑자기 메모리가 10메가 20메가 정도 증가하는 현상이 나타날 것으로 생각됩니다.(로그양이 적다면 문제가 안되지만, 많은 양의 로그를 출력할때요)

https://bugs.eclipse.org/bugs/show_bug.cgi?id=202564 에도 잠간 언급이 되어 있고
버그 픽스는 https://bugs.eclipse.org/bugs/attachment.cgi?id=78700 로 되어서 나옵니다.

버그는 3.4m2시절에 나왔고 2007년 9월에 픽스 되어 있지만, Eclipse 3.4의 마지막 버전인 3.4.2 sr2(2009.02) 버전에도 수정사항은 반영이 되어 있지 않습니다.

3.5의 코드를 보면 다음과 같이 수정되어 있습니다.
org.eclipse.ui.internal.console.IOConsolePartitioner#documentChanged2(DocumentEvent event)는 다음과 같이 수정되어 있습니다.

if (lastPartition != null && lastPartition.getType().equals(IOConsolePartition.INPUT_PARTITION_TYPE)) {
synchronized (partitions) {
partitions.remove(lastPartition);
inputPartitions.remove(lastPartition);
}
}

다음과 같이 반영 되어 있습니다.
코드를 수정해서 테스트 해보니 메모리 증가하는것은 어느정도 해결된것으로 보입니다.

ps) gc가 수행될때 gc는 잘 동작합니다. 로그 가져올때마다 신경쓰이신다면 코드를 수정해보시는것도 방법 이겠습니다.

댓글 없음:

댓글 쓰기