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

Can the program performance be optimized? #732

Open
sky126 opened this issue Oct 24, 2024 · 2 comments
Open

Can the program performance be optimized? #732

sky126 opened this issue Oct 24, 2024 · 2 comments

Comments

@sky126
Copy link

sky126 commented Oct 24, 2024

image

Can the program performance be optimized? There are too many loops. Are the following two pieces of code repeated?

 for value in line-data {
    if x-domain-min > value.at(0) {
      x-domain-min = value.at(0)
    }
    if x-domain-max < value.at(0) {
      x-domain-max = value.at(0)
    }

    if y-domain-min > value.at(1) {
      y-domain-min = value.at(1)
    }
    if y-domain-max < value.at(1) {
      y-domain-max = value.at(1)
    }
  }

image

@johannes-wolf
Copy link
Member

I hope it can be improved. The clipping algorithm is quite naive. If you can find any perf. Improvements, feel free to open a PR. Currently, I do not have the time to do it.

@sky126
Copy link
Author

sky126 commented Oct 25, 2024

I've been looking at the code for a few days, but I still don't understand it very well.

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