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

Scalability: Handle large number of apps in cf dashboards #3212

Merged
merged 26 commits into from
Jan 9, 2019

Conversation

richard-cox
Copy link
Contributor

@richard-cox richard-cox commented Nov 19, 2018

Blocked on #2961
Fixes #2898

  • Fetch list of apps independently of space request (not inline)
  • If there are too many apps to fetch then don't show dependent stats (memory consumed, app instances, etc)
  • Fall back on alternative method to get app counts at org and space level when there are too many apps
  • Encompass small cards and recently updated apps within a loading indicator, only show contents once we know exactly which we can show. This avoids cards and components blipping around
  • To test reduce the flattenPaginationMax value of the action GetAllApplications

Ensure CF, Org & Space levels are functional given large amounts of apps
- Removed inlined apps when fetching orgs/org/space
- Create new source of apps for consumers (recently updated apps, app count, app instances counter, etc)
- When there are too many apps in new source remove all dependent visual components except app count (fetched by independent call when at org or space level)
- Hide all small cards and recently updated apps card behind loading indicator
@cfdreddbot
Copy link

✅ Hey richard-cox! The commit authors and yourself have already signed the CLA.

@codecov
Copy link

codecov bot commented Nov 19, 2018

Codecov Report

Merging #3212 into v2-master will decrease coverage by <.01%.
The diff coverage is 79.2%.

@@              Coverage Diff              @@
##           v2-master    #3212      +/-   ##
=============================================
- Coverage      70.87%   70.87%   -0.01%     
=============================================
  Files            653      653              
  Lines          28862    28936      +74     
  Branches        6564     6575      +11     
=============================================
+ Hits           20457    20508      +51     
- Misses          8405     8428      +23

- The fetch action was being dispatched twice due to a rogue state change
- Rogue state change was incorrectly setting the page size
- Ensure that when we're in an empty state that's pre-fetch don't attempt to correct the page size
- Bump 'maxedResults` observable down from list to data source
- Bump dependend sort and filter observables down as well
- Don't fire reset action.. which previously kicked off new fetch list request
- Now fetch list request is kicked off via filter change (only for maxed case)
- Ensure we set q params correctly when using SetParams
  - Don't update the state via obj ref (see `newParams.q = qChanges`)
  - Set should replace all of q (including removing any old values)
- NOTE - This does not solve the issue where the list is removed and shown again on filter change
  - This occurrs because the page$ observable executes the filters on the stale page list before executing again on proper page list
  - There's no clear way to block this without getting hacky (pagination section has not marked anything as busy)
- inidicator overlap originally added due to borders in hidden content showing outside of loading indiciator overlay
- added margin to overlay, which this commit reduces, to ensure all content is hidden
Copy link
Contributor

@nwmac nwmac left a comment

Choose a reason for hiding this comment

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

LGTM

@nwmac nwmac merged commit 158687b into v2-master Jan 9, 2019
@nwmac nwmac deleted the scale-latest-apps branch January 9, 2019 12:48
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants