This repository has been archived by the owner on Aug 28, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
Preload indicator chart static config #1093
Merged
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
rmartz
changed the title
Preload indicator chart static config
[WIP] Preload indicator chart static config
Apr 4, 2018
rmartz
force-pushed
the
feature/preload-static-config
branch
from
April 4, 2018 18:48
87d690b
to
a8afab9
Compare
rmartz
changed the title
[WIP] Preload indicator chart static config
Preload indicator chart static config
Apr 4, 2018
Fixed the linter error, was worried there was a problem causing tests to fail locally with an odd error, but all appears to be good |
rmartz
force-pushed
the
feature/preload-static-config
branch
from
April 5, 2018 15:45
a8afab9
to
ea960eb
Compare
Rebased and added CHANGELOG entry. |
fungjj92
approved these changes
Apr 6, 2018
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yooooo 👏 Nice!! Works great, clean implementation. Just one typo in a comment. Sorry for review delay~
private scenarioService: ScenarioService, | ||
private modelService: ClimateModelService) { | ||
this.userService.currentUser.first().subscribe(() => { | ||
// Issue a eager request for indicator static configuration data so it's already cached if |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Typo: "an" eager
rmartz
force-pushed
the
feature/preload-static-config
branch
from
April 6, 2018 14:07
ea960eb
to
9223c66
Compare
Thanks! Fixed the grammatical error, merging now |
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Overview
In the indicator chart component, each configuration controller renders once its data has loaded, producing a disorganized effect as components individually pop in. Because each controller handles its own loading, using a collective guard against all of them appears to be infeasible.
Instead, this leverages the caching behavior of the services, issuing an "eager" request on app load so the cache is already hot when needed by a user.
Eager loading is performed in the AppModule component structured on this StackOverflow answer.
Demo
Testing Instructions
Log out and refresh
Log in
Navigate to the indicators page
Open an indicator chart
Refresh
Open an indicator chart
Is the "[Unreleased]" section of the CHANGELOG.md updated with any changes that might complicate the next release? Consider adding links to any related PRs if additional context is required, but avoid only including the link in the CHANGELOG, with no additional description.
Connects #998