Improve page load performance across the board.#2248
Merged
ketan merged 1 commit intogocd:masterfrom Jun 6, 2016
Merged
Conversation
| public synchronized void onTimer(CruiseConfigProvider provider) { | ||
| CruiseConfig currentConfig = provider.getCurrentConfig(); | ||
| getAllValidLogs(currentConfig); | ||
| LOG.info("Recomputing material to pipeline mappings."); |
Member
There was a problem hiding this comment.
Should this be INFO level or DEBUG? I guess it's ok because our default log level for the appender is WARN, but it doesn't seem like something a user or anyone should care about on a regular basis.
Member
|
Looks good to me. Apart from what I mentioned in the comments above. |
a55601e to
6173f03
Compare
This PR solves 2 problems — Problem 1 --------- The `ApplicationController#populate_health_messages` filter was called on every page load, and was re-computing all health state messages. This computation had n^2 complexity for every health state message that had to be rendered, this health state was rendered at the bottom of every page inside go. We now don't render the errors on page load, but rely on the ajax poll to eventually render the errors in a few seconds after the page loads Problem 2 --------- To further reduce the cost of computation, we now pre-compute the health state messages, and the pipelines that each server health state message belongs to, via a background thread.
ae12856 to
204044c
Compare
This file contains hidden or 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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
This PR solves 2 problems —
Problem 1
The
ApplicationController#populate_health_messagesfilter was calledon every page load, and was re-computing all health state messages.
This computation had n^2 complexity for every health state message that
had to be rendered, this health state was rendered at the bottom of
every page inside go.
We now don't render the errors on page load, but rely on the ajax poll
to eventually render the errors in a few seconds after the page loads
Problem 2
To further reduce the cost of computation, we now pre-compute the health
state messages, and the pipelines that each server health state message
belongs to, via a background thread.