nightly spoofax + nightly webdsl eclipse 4.3.2 becomes unresponsive fast
I’m trying to figure out why Eclipse becomes unresponsive after about 10 minutes of editing in a webdsl application
These are the Spoofax fragments I found in the jstack output at the point it is unresponsive:
at org.eclipse.core.internal.runtime.Log.log(Log.java:62) at org.strategoxt.imp.runtime.RuntimeActivator.tryLog(RuntimeActivator.java:193) at org.strategoxt.imp.runtime.Environment.logException(Environment.java:242) at org.strategoxt.imp.runtime.Environment.logException(Environment.java:257) at org.strategoxt.imp.runtime.services.StrategoObserver.update(StrategoObserver.java:407) at org.strategoxt.imp.runtime.FileState.getAnalyzedAst(FileState.java:91) at org.strategoxt.imp.runtime.services.OnSaveService.documentChanged(OnSaveService.java:58) at org.eclipse.imp.editor.UniversalEditor.doSave(UniversalEditor.java:1944)
.
at org.strategoxt.imp.runtime.SWTSafeLock.lock(SWTSafeLock.java:49) at org.strategoxt.imp.runtime.services.StrategoReferenceResolver.getLinkText(StrategoReferenceResolver.java:79) at org.strategoxt.imp.runtime.dynamicloading.DynamicReferenceResolver.getLinkText(DynamicReferenceResolver.java:25) at org.strategoxt.imp.runtime.services.DocumentationProvider.getDocumentation(DocumentationProvider.java:28) at org.strategoxt.imp.runtime.services.AnnotationHoverHelper.getHoverHelpAt(AnnotationHoverHelper.java:48) at org.eclipse.imp.editor.internal.HoverHelpController.getHoverInfo(HoverHelpController.java:59)
.
at org.strategoxt.imp.runtime.SWTSafeLock.lock(SWTSafeLock.java:49) at org.strategoxt.imp.runtime.services.StrategoObserverBackgroundUpdateJob.analyzeFile(StrategoObserverBackgroundUpdateJob.java:98) at org.strategoxt.imp.runtime.services.StrategoObserverBackgroundUpdateJob.analyze(StrategoObserverBackgroundUpdateJob.java:64) at org.strategoxt.imp.runtime.services.StrategoAnalysisQueue$UpdateJob.run(StrategoAnalysisQueue.java:82) at org.eclipse.core.internal.jobs.Worker.run(Worker.java:53)
.
Submitted by Danny Groenewegen on 11 June 2014 at 11:13at org.strategoxt.imp.runtime.SWTSafeLock.lock(SWTSafeLock.java:49) at org.strategoxt.imp.runtime.services.StrategoObserverUpdateJob.analyze(StrategoObserverUpdateJob.java:26) at org.strategoxt.imp.runtime.services.StrategoAnalysisQueue$UpdateJob.run(StrategoAnalysisQueue.java:82) at org.eclipse.core.internal.jobs.Worker.run(Worker.java:53)
Attachments
Issue Log
Possible cause: debugging showed that the webdsl editor jar is reloaded very often, which should only happen once. If the old jars cannot be cleaned, permgen also fills quickly, which can cause Eclipse to hang.
This is being caused by interpreter prototypes being thrown away too quickly, causing a frequent reload of the ctree/jar files, which takes about 13 seconds for WebDSL. The prototypes are being thrown away because they are stored in a WeakWeakMap which uses weak references for values, meaning that a prototype is finalized when there are no references to it any more. I think the prototype should be a soft reference instead, so that the prototype is only thrown away when there is memory pressure.
I have made this change in https://github.com/metaborg/spoofax/commit/f337ff081c0e1491a629a6e2fa903d947e496ed7, can you confirm that this solves the problem?
I’m getting very slow response when executing a pretty basic Stratego builder with Spoofax Core 1.2.0.0-s41697 (nighly installed on June 23, 2014).
Log in to post comments