Skip to content

Drastically improve gui performance#57

Open
leducp wants to merge 5 commits intomainfrom
improve_gui_performance
Open

Drastically improve gui performance#57
leducp wants to merge 5 commits intomainfrom
improve_gui_performance

Conversation

@leducp
Copy link
Collaborator

@leducp leducp commented Mar 23, 2026

GUI is unusable as soon as there is too many curves (even if not big: my test sample is 11 curves of 4minutes each).

This PR improve the GUI performance and usability: now the test sample is roughly around  ~60% CPU on my mpachine when displaying everything, without the feeling of sluggishness

leducp added 5 commits March 23, 2026 09:35
Reduce decimation to 8000 (instead of 200000) which still give 2 points per pixel on a 4K display
- thread it
- dynamically adapt the unit

change tooltip for a cross for better readability and improve the snapping to not miss points
Serie::Serie(std::string const& name, std::vector<Point>&& raw_serie, ImVec4 color)
{
constexpr uint32_t DECIMATION = 200'000;
constexpr uint32_t DECIMATION = 8'000;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Any particular reason why this changed ? Is there a preference for smaller sections?

double abs_val = std::abs(seconds);

if (abs_value >= 31536000) // Years (365 days)
if (abs_val >= 31536000)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Keep comments they help with readability

{
if (serie_.empty())
{
//TODO: Display something to say its empty?
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Add back todo. This is useful to add later

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.

2 participants