Skip to content

Don't reload graph data on every interaction#1600

Merged
ra3xdh merged 1 commit intocurrentfrom
1598_fix
Mar 15, 2026
Merged

Don't reload graph data on every interaction#1600
ra3xdh merged 1 commit intocurrentfrom
1598_fix

Conversation

@ra3xdh
Copy link
Copy Markdown
Owner

@ra3xdh ra3xdh commented Mar 14, 2026

I have received a patch providing a fix for #1598 by email. This PR reloads graph data only if it was changes.

@tskaar
Copy link
Copy Markdown
Contributor

tskaar commented Mar 14, 2026

This improves the performance significantly, thanks!

One thing though; currently, if the diagram resizes, one does not do the re-calculation, e.g.

Before stretching
image

After stretching
image

The dependency is here:

auto max_points = std::max(parentDiagram()->boundingRect().width(),
parentDiagram()->boundingRect().height());

@ra3xdh ra3xdh marked this pull request as draft March 14, 2026 17:46
@dsm
Copy link
Copy Markdown
Collaborator

dsm commented Mar 14, 2026

Hi MacOS x86_64 build failed. Fix: QList::assign() compatibility with Qt < 6.6

QList::assign() was introduced in Qt 6.6. Replaced it with the range constructor which has been available since Qt 6.0:

// Before (requires Qt 6.6+)
lines.assign(std::begin(joint_lines), std::end(joint_lines));

// After (works with Qt 6.2+)
lines = QList<QLineF>(std::begin(joint_lines), std::end(joint_lines));

Fixes macOS CI x86_64 build failure.

@ra3xdh ra3xdh marked this pull request as ready for review March 15, 2026 15:51
@ra3xdh
Copy link
Copy Markdown
Owner Author

ra3xdh commented Mar 15, 2026

The build for Qt version less than 6.6 and the problem with resize has been fixed.

@tskaar
Copy link
Copy Markdown
Contributor

tskaar commented Mar 15, 2026

Can confirm the stretching update is now working as expected, thanks!

@ra3xdh ra3xdh merged commit e60dac9 into current Mar 15, 2026
8 checks passed
@ra3xdh
Copy link
Copy Markdown
Owner Author

ra3xdh commented Mar 15, 2026

Merged.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

performance: graphs are being re-calculated on every interaction

3 participants