Bug 513420 - Refresh application states in server editor may takes a long time
Summary: Refresh application states in server editor may takes a long time
Status: NEW
Alias: None
Product: CFT
Classification: ECD
Component: General (show other bugs)
Version: unspecified   Edit
Hardware: PC Mac OS X
: P3 normal
Target Milestone: 1.1.0 M7   Edit
Assignee: Project Inbox CLA
QA Contact:
URL:
Whiteboard:
Keywords: plan
Depends on:
Blocks:
 
Reported: 2017-03-09 16:59 EST by Elson Yuen CLA
Modified: 2017-05-19 14:32 EDT (History)
1 user (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Elson Yuen CLA 2017-03-09 16:59:30 EST
When opening up the server editor, the editor will try to get the current application states.  If the user has a space that has lots of applications, the user may see the list of application with all apps in "Unknown" state for a long time before the application state gets refreshed. The problem is caused by the tools currently refresh all applications at the same time and only return when all applications states are available.

We can improve the user experience in one of the following ways:
1. Refresh the application state for each application separately (if there is not a lot of overhead on each refresh operation
2. Refresh in a group of application, e.g. 3-5 applications, each time. (if #1 is not efficient).
3. Consider to not refresh the state but just reuse the existing application state showing on the Servers view. The user can hit the refresh button if the user think it is out of sync.
Comment 1 Nieraj Singh CLA 2017-05-12 17:33:48 EDT
Pushed a fix that now does parallel refresh of apps in a server. Uses Java 8 parallel streaming.

The refresh is still a two stage operation:

- First stage still fetches a list applications with basic information in one operation, which is relatively quick
- Second stage is what has been improved: it now performs parallel refresh of each application, fetching more detailed information including the app state in CF.

Using parallel refresh in the second stage appears to dramatically increase refresh time for a server with many apps
Comment 2 Nieraj Singh CLA 2017-05-19 14:32:16 EDT
We still have to verify that using Java parallel streams doesn't cause issues with potentially long network I/O to CF.