-
Hi, I have a suspicion that it may be the internal version management and that too many versions of the rather large GLSP model will eventually take up too much memory. Can this be the reason for such a behaviour? |
Beta Was this translation helpful? Give feedback.
Replies: 5 comments 16 replies
-
Hi, hm, this is a very interesting observation. I haven't seen it myself yet, but I can't rule out that there might be some memory leak or inefficiency in the VS Code integration somewhere, e.g. in the VSCode custom document integration. Can you reproduce this also with the minimal example? Thank you! |
Beta Was this translation helpful? Give feedback.
-
Hi @planger, But in VS-Code the problem can be reproduced with Open-BPMN VS-Code Extension in minutes. Do you have a VSIX file of the Minimal Example somewhere I can use for testing? |
Beta Was this translation helpful? Give feedback.
-
I tried out the latest version of the workflow example vscode-extension. I was NOT able to reproduce the problem with the VSIX extension file. One difference seems to be that the workflow example uses a Node Server, and Open-BPMN is using a Java Server component. But my problem when migrating to 1.1.0-RC10 was that I did not found an example of how to integrate a Java Server and there was a lot of changes in the api. So at the end I did a lot of guessing how to implement the extension.ts :-/ Maybe you can have just a short look at my code open-bpmn-extension.ts if there is something you are not happy with. Or maybe you can provide me an example of how the extension.ts should look like if I want to integrate a Java server instead of nodejs server? |
Beta Was this translation helpful? Give feedback.
-
Hi @tortmayr , you where (of course) right. The problem was caused by the diagram itself on the client side. It was observable with Theia in Chromium too but not in Firefox Browser. The reason for the memory leak is this component which I used to display and edit multi-line text: export class MultiLineTextNode extends ForeignObjectElement implements SArgumentable, EditableLabel {
readonly isMultiLine = true;
readonly args: Args;
text = '';
override set bounds(bounds: Bounds) {
/* ignore set bounds, always use the parent's bounds */
}
override get bounds(): Bounds {
if (isBoundsAware(this.parent)) {
return {
x: this.position.x,
y: this.position.y,
width: this.parent.bounds.width,
height: this.parent.bounds.height
};
}
return Bounds.EMPTY;
}
// @ts-expect-error Arguments are set in the element
override get code(): string {
if (this.text === '') {
const textArg = this.args['text'];
if (typeof textArg === 'string') {
this.text = textArg;
}
}
return `<pre>${this.text}</pre>`;
}
override namespace = 'http://www.w3.org/1999/xhtml';
get editControlDimension(): Dimension {
return {
width: this.bounds.width - 4,
height: this.bounds.height - 4
};
}
} The code is the origin example from the documentation here Only removing this part solves the problem. |
Beta Was this translation helpful? Give feedback.
-
Finally I solved the issue by removing my
I also implemented a new Multi-Line-Label-View (very cool) which I will post in a separate thread soon. |
Beta Was this translation helpful? Give feedback.
Finally I solved the issue by removing my
ForeignObjectElement
completely from the diagram. This solved at the end two problems:I also implemented a new Multi-Line-Label-View (very cool) which I will post in a separate thread soon.