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

Fix EVR page freeze issue #6

Merged
merged 15 commits into from
Jul 6, 2021
Merged

Fix EVR page freeze issue #6

merged 15 commits into from
Jul 6, 2021

Conversation

saba-ja
Copy link
Contributor

@saba-ja saba-ja commented Jun 30, 2021

Originating Project/Creator F Prime
Affected Component GDS
Affected Architectures(s) -
Related Issue(s) -
Has Unit Tests (y/n) No
Builds Without Errors (y/n) Yes
Unit Tests Pass (y/n) NA
Documentation Included (y/n) Yes

Change Description

Current GDS Event page freezes when the number of EVRs in the event table reaches a certain size.
This issue makes the entire webpage irresponsive.

Rationale

The issue is DOM rendering is computationally expensive and having too many HTML elements in the DOM can effect browser's performance. To fix the issue this PR adds lazy loading of EVRs. Events are only added up to a certain number. After the maximum size user has to scroll down to the bottom of the page to load the next group of EVRs. Upon adding the new group the previous EVRs are removed from the DOM.

Testing/Review Recommendations

Manually tested and verified root cause of the slow down is the number of HTML elements and not memory issues.
GDS with issue

Manually verified GDS functionality after the fix. As shown in the video below the EVR table had ~28K EVRs and the page did not show any sign of slow down:
GDS EVR fixed

Functionalities:

  • Load next EVR group after scrolling down.
  • Load prev EVR group after scrolling up.
  • Can use First button to move to the top of the list.
  • Can use Last button to move to the bottom of the list.
  • Can stay at the bottom when pressing Last button or scrolling down to the last element of the list.
  • Will activate auto update when at the end of the list. Shows a green flag to indicate auto update is enabled.
  • Shows total size of EVR list.
  • Show start and end of current EVR window.

Future Work

NA

@github-actions
Copy link

Misspellings found, please review:

  • milisecond
  • scrollability
To accept these changes, run the following commands from this repository on this branch
pushd $(git rev-parse --show-toplevel)
perl -e '
my $new_expect_file=".github/actions/spelling/expect.txt";
use File::Path qw(make_path);
make_path ".github/actions/spelling";
open FILE, q{<}, $new_expect_file; chomp(my @words = <FILE>); close FILE;
my @add=qw('"milisecond scrollability "');
my %items; @items{@words} = @words x (1); @items{@add} = @add x (1);
@words = sort {lc($a) cmp lc($b)} keys %items;
open FILE, q{>}, $new_expect_file; for my $word (@words) { print FILE "$word\n" if $word =~ /\w/; };
close FILE;'
popd

@github-actions
Copy link

github-actions bot commented Jul 6, 2021

Misspellings found, please review:

  • bbb
  • ccc
  • ddd
  • eee
  • fff
  • ggg
  • HHH
  • jjj
  • kkk
  • lll
  • mmm
  • nnn
  • ooo
  • ppp
  • qqq
  • rrr
  • SUUU
  • ttt
  • UUU
  • VVV
  • yyy
  • zzz
To accept these changes, run the following commands from this repository on this branch
pushd $(git rev-parse --show-toplevel)
perl -e '
my $new_expect_file=".github/actions/spelling/expect.txt";
use File::Path qw(make_path);
make_path ".github/actions/spelling";
open FILE, q{<}, $new_expect_file; chomp(my @words = <FILE>); close FILE;
my @add=qw('"bbb ccc ddd eee fff ggg HHH jjj kkk lll mmm nnn ooo ppp qqq rrr SUUU ttt UUU VVV yyy zzz "');
my %items; @items{@words} = @words x (1); @items{@add} = @add x (1);
@words = sort {lc($a) cmp lc($b)} keys %items;
open FILE, q{>}, $new_expect_file; for my $word (@words) { print FILE "$word\n" if $word =~ /\w/; };
close FILE;'
popd

@github-actions
Copy link

github-actions bot commented Jul 6, 2021

Misspellings found, please review:

  • bbb
  • ccc
  • ddd
  • eee
  • fff
  • ggg
  • HHH
  • jjj
  • kkk
  • lll
  • mmm
  • nnn
  • ooo
  • ppp
  • qqq
  • rrr
  • SUUU
  • ttt
  • UUU
  • VVV
  • yyy
  • zzz
To accept these changes, run the following commands from this repository on this branch
pushd $(git rev-parse --show-toplevel)
perl -e '
my $new_expect_file=".github/actions/spelling/expect.txt";
use File::Path qw(make_path);
make_path ".github/actions/spelling";
open FILE, q{<}, $new_expect_file; chomp(my @words = <FILE>); close FILE;
my @add=qw('"bbb ccc ddd eee fff ggg HHH jjj kkk lll mmm nnn ooo ppp qqq rrr SUUU ttt UUU VVV yyy zzz "');
my %items; @items{@words} = @words x (1); @items{@add} = @add x (1);
@words = sort {lc($a) cmp lc($b)} keys %items;
open FILE, q{>}, $new_expect_file; for my $word (@words) { print FILE "$word\n" if $word =~ /\w/; };
close FILE;'
popd

@github-actions
Copy link

github-actions bot commented Jul 6, 2021

Misspellings found, please review:

  • bbb
  • ccc
  • ddd
  • eee
  • ggg
  • HHH
  • jjj
  • kkk
  • lll
  • mmm
  • nnn
  • ooo
  • ppp
  • qqq
  • rrr
  • SUUU
  • ttt
  • UUU
  • VVV
  • yyy
  • zzz
To accept these changes, run the following commands from this repository on this branch
pushd $(git rev-parse --show-toplevel)
perl -e '
my $new_expect_file=".github/actions/spelling/expect.txt";
use File::Path qw(make_path);
make_path ".github/actions/spelling";
open FILE, q{<}, $new_expect_file; chomp(my @words = <FILE>); close FILE;
my @add=qw('"bbb ccc ddd eee ggg HHH jjj kkk lll mmm nnn ooo ppp qqq rrr SUUU ttt UUU VVV yyy zzz "');
my %items; @items{@words} = @words x (1); @items{@add} = @add x (1);
@words = sort {lc($a) cmp lc($b)} keys %items;
open FILE, q{>}, $new_expect_file; for my $word (@words) { print FILE "$word\n" if $word =~ /\w/; };
close FILE;'
popd

Copy link
Collaborator

@LeStarch LeStarch left a comment

Choose a reason for hiding this comment

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

The video really helped!

@LeStarch LeStarch merged commit 06310b0 into nasa:devel Jul 6, 2021
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