Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[performance] take a shortcut for viewport changes #25

Closed
JanKoehnlein opened this issue Nov 23, 2018 · 2 comments
Closed

[performance] take a shortcut for viewport changes #25

JanKoehnlein opened this issue Nov 23, 2018 · 2 comments

Comments

@JanKoehnlein
Copy link
Contributor

With big diagrams, scrolling and zooming gets very slow as we recalculate and patch the entire tree.
We should add so kind of shortcut for changes that just affect the viewport.

@FelixJoehnk
Copy link
Contributor

FelixJoehnk commented Jul 9, 2021

Hello @spoenemann, @JanKoehnlein ,
I am currently working on icreasing the performace. The Main Problem for large graphs are Zoom actions right now, resulting in setviewport actions that are done one after another.
The Idea we had was to make a delay (5-20ms) so that one can make a list of setviewport actions in the Mouse Tool and then merge those in a good way :)
Is that a change that should bei added to sprotty?
Then i would try and rewrite Part of the Mouse Tool !

Greate regards Felix

@spoenemann
Copy link
Contributor

The merge method is used to merge multiple commands within the same animation frame:

export abstract class MergeableCommand extends Command {
/**
* Tries to merge the given command with this.
*
* @param command
* @param context
*/
merge(command: ICommand, context: CommandExecutionContext): boolean {
return false;
}
}

As to the proposal to take a shortcut for viewport changes: This would break the implementation of Level-of-Detail rendering, i.e. omitting selected details when the user has zoomed out. We already have that in our Multicore example.

There are already other ways to improve the performance for large graphs, and those work for all diagram interactions, not just viewport changes. I had a presentation about that together with @jbicker at EclipseCon 2023, and we're going to publish a blog post at https://www.typefox.io/blog/ soon.

@spoenemann spoenemann closed this as not planned Won't fix, can't repro, duplicate, stale Nov 6, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants