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

Clear all stored trend values when changing active trend. #176

Merged
merged 3 commits into from
Jun 3, 2020

Conversation

eidekrist
Copy link
Member

@eidekrist eidekrist commented Jun 2, 2020

Fixes #175 by removing all stored trend data when navigating to/from a plot.

If the user is looking at a lot of trend data (long time span, many variables etc), the whole application can slow down. By navigating away from the plot the application will become snappy again.

Consequence: When navigating to a plot, it can take 3-4 seconds before any data appears. Before the fix, old data was shown in the mean time. Update; I have created a little shortcut such that when navigating to a plot, the initial data is generated much faster than before.

@eidekrist eidekrist added the bug Something isn't working label Jun 2, 2020
Copy link
Member

@ljamt ljamt left a comment

Choose a reason for hiding this comment

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

Clearing data for the inactive plots really made a difference 👍
Fix looks good.
Tested with CI artifact.

@cesarcarc
Copy link
Contributor

cesarcarc commented Jun 3, 2020

Nice improvement! Now, the application becomes more responsive when not in the trend view. Whenever entering the trend view, we first see the empty plot for a few seconds (here, time will vary depending on how many variables and which time span is selected).

@cesarcarc
Copy link
Contributor

I believe I might have found a small issue:

Setup:
House configuration loaded
2 plots configured:

  • Plot 1 (only one signal, clock.clock), time span; 10s
  • Plot 2 (3 signals, OuterWall1.h_wall, Room1.T_room, Room2.T_room): time span: 20m

Action 1:

  • Navigate to plot 2 (ws messages around 6.5MB), click on timespan 20m
  • Navigate to plot 1

Result 1:

  • (ws messages around 4.3MB)

Action 2:

  • Navigate to clock model (WS messages drop to 19kb)
  • Navigate back to plot 1

Result 2:

  • (ws messages around 19kb)

It seems that when switching from Plot2 to Plot1, the timespan of plot 2 is retained.

Copy link
Contributor

@cesarcarc cesarcarc left a comment

Choose a reason for hiding this comment

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

See comment above.

@eidekrist
Copy link
Member Author

It seems that when switching from Plot2 to Plot1, the timespan of plot 2 is retained.

I can't reproduce this.

Copy link
Contributor

@cesarcarc cesarcarc left a comment

Choose a reason for hiding this comment

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

As discussed over teams, I have checked your last commit.

It seems the issue I have reported is now fixed. Nice!

@eidekrist eidekrist merged commit 4863563 into master Jun 3, 2020
@eidekrist eidekrist deleted the bugfix/175-send-only-necessary-plot-data branch June 3, 2020 11:38
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Server sends unnecessary plot data
3 participants