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

Using canvas instead on SVG too render #25

Open
ganeshgore opened this issue Sep 16, 2021 · 1 comment
Open

Using canvas instead on SVG too render #25

ganeshgore opened this issue Sep 16, 2021 · 1 comment

Comments

@ganeshgore
Copy link

For bigger schematics (CRC.json) the rendering takes much longer.
Do you believe using d3 canvas render instead of SVG will improve the performance?

@Nic30
Copy link
Owner

Nic30 commented Sep 17, 2021

Use this flag to debug what is actually taking so long:
https://github.com/Nic30/d3-hwschematic/blob/master/src/d3-hwschematic.js#L65

I think that the problem was the the layout (the algorithm which resolves how wires will be routed and components placed, not the actual rendering),
layout is generated by elkjs, the options have great affect on performance https://www.eclipse.org/elk/reference/options.html
(I picked something default, but it can be user overriden.)
(the layout can be also precomputed, if necessary, but there is problem with expandable components as each expansion state is a new graph which has to have layout resolved)

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

2 participants