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

Improve graph rendering performance #1042

Merged
merged 1 commit into from
Nov 4, 2024

Conversation

wawuwo
Copy link
Contributor

@wawuwo wawuwo commented Nov 3, 2024

Hi!

A quick and dirty attempt to deal with bad rendering performance of graphs.
It's not the best, but it should do the thing. I can see the actual difference when opening the sample circuit from #984 on my machine.

@SmallJoker
Copy link

Thank you for the PR. I tested the AppImage a little bit, and so far it does indeed fix the performance issue. No visual issues found.

@zergud
Copy link
Collaborator

zergud commented Nov 3, 2024

good solution for lines!
remains drawArrowSymbols drawStarSymbols (!!) drawCircleSymbols

@iwbnwif
Copy link
Contributor

iwbnwif commented Nov 4, 2024

I am not sure if it is related to this optimisation, but I have a line being drawn to infinity if I zoom in on the chart. It isn't there on the previous CI build.

image

Test1.sch.txt

@ra3xdh
Copy link
Owner

ra3xdh commented Nov 4, 2024

@wawuwo , Yes were considering a similar solution with points number decimation. The freezes are gone, but some problem still exist.

  • The dashed curves look odd. See the screenshots from old (before Refactor drawing subsystem #723) and new version. This problem is not related to this fix and may be fixed by a separate PR.

old:
image

new:
image

  • I confirm the problem reported by @iwbnwif Something strange happens when using Set diagram limits

@zergud The circles, arrows, and stars count usually should be equal to point number. The typical usecase is a Fourier simulation (arrows) and matching of the few points of experimental data (stars).

image

@ra3xdh ra3xdh linked an issue Nov 4, 2024 that may be closed by this pull request
@wawuwo wawuwo force-pushed the 984-optimize-graph-rendering branch from ea0d2ff to b0f4e49 Compare November 4, 2024 15:59
@ra3xdh
Copy link
Owner

ra3xdh commented Nov 4, 2024

The problems with dashed curve and Set limits are fixed. I will merge this once the CI finishes.

@ra3xdh ra3xdh merged commit 961074b into ra3xdh:current Nov 4, 2024
7 checks passed
@ra3xdh
Copy link
Owner

ra3xdh commented Nov 4, 2024

Merged.

@zergud
Copy link
Collaborator

zergud commented Nov 4, 2024

and yet, the behavior when using stars and circles is not correct when there are a large number of points in the dataset

black bold line - circle
red - stars

image

I think we can find a solution similar to the proposed algorithm for decimation of points
of course in another PR :)

@ra3xdh
Copy link
Owner

ra3xdh commented Nov 5, 2024

Octave package has the same behavior as Qucs-S when using stars line style. Here is the screenshot from Octave. Blue curve is stars 2000 points, redcurve is stars 20 points. So I would keep the stars/circles in Qucs-S as is.

image

image

@ra3xdh ra3xdh added this to the 24.4.1 milestone Nov 12, 2024
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

Successfully merging this pull request may close these issues.

Rendering performance regression since version 24.3.0
5 participants