[
https://issues.jboss.org/browse/JBIDE-21828?page=com.atlassian.jira.plugi...
]
Viacheslav Kabanovich commented on JBIDE-21828:
-----------------------------------------------
The first point (new substracture is created internally in a silent manner) is critical
for performance in large models. Suppose, an object is added which has thousands of
objects in its sub-tree. This object was not in model, adding just it one already loaded
and firing only one event for it is good enough for all clients, both UI and core. If it
is first added while not loaded, fired to make clients aware of it, and then is loaded
firing thousands of events, then it puts high load to performance.
This can be easily reconciled with observable framework by this trick: do not add new
object and do not bind it to listeners until it is loaded. Then, what if the object should
be lazy to load, what then is the difference? That is where merge is important. Model
knows its loaded nodes, when merging into the existing structure, the merge process will
prompt new structure to 'expand' to needed level. And it is important that it will
not be prompted by UI which would bounce loading between UI thread and non-UI thread,
entangling them and making both performance and UI-refresh problems.
And to follow this approach, separating model from content provider is inevitable. The
content provider is prompted by UI every time it gets an event, we then are at the hard
choice sync/async. If model is separate, the choice is easy, it is one - just get from the
model what it has at the moment and watch for next events, and process it with refresh() -
whatever the order of events, that will give ui the most recent state of model. Model,
when requested for children of an object which is not fully loaded yet, will start a
loading job, and due to merge, clients will be notified only of exact incremental changes
in known to them objects. Compare it to the approach of removing all children then adding
new children and letting ui prompt them to load thus causing a lot of events and ui
forgetfulness of the expanded state that should be solved on ui side.
OpenShift Explorer view flickers when refreshing a service
----------------------------------------------------------
Key: JBIDE-21828
URL:
https://issues.jboss.org/browse/JBIDE-21828
Project: Tools (JBoss Tools)
Issue Type: Bug
Components: openshift
Affects Versions: 4.3.1.Beta2
Reporter: Xavier Coulon
Attachments: Screenshot 2016-03-08 10.32.39.png
When calling the "Refresh" command on a service, the tree view flickers because
of too many refresh calls.
Adding some traces revealed 25 calls to
{{BaseExplorerContentProvider#refreshViewer(Object)}}, which seems way too much for a
service with a single pod.
Attachement: screenshot of the OpenShift Server view, showing 2 projects, one of which
has 3 services.
Custom/added logs in the console:
{code}
Refreshing viewer from
org.jboss.tools.openshift.internal.ui.models.OpenShiftProjectUIModel@431dafbc
Refreshing viewer from
org.jboss.tools.openshift.internal.ui.models.OpenShiftProjectUIModel@431dafbc
Refreshing viewer from
org.jboss.tools.openshift.internal.ui.models.OpenShiftProjectUIModel@431dafbc
Refreshing viewer from
org.jboss.tools.openshift.internal.ui.models.OpenShiftProjectUIModel@431dafbc
Refreshing viewer from
org.jboss.tools.openshift.internal.ui.models.OpenShiftProjectUIModel@431dafbc
Refreshing viewer from
org.jboss.tools.openshift.internal.ui.models.OpenShiftProjectUIModel@431dafbc
Refreshing viewer from sample/jee-sample
Refreshing viewer from sample/jee-sample
Refreshing viewer from sample/jee-sample
Refreshing viewer from sample/jee-sample
Refreshing viewer from sample/mongodb
Refreshing viewer from sample/mongodb
Refreshing viewer from sample/mongodb
Refreshing viewer from sample/nodejs-mongodb-example
Refreshing viewer from sample/nodejs-mongodb-example
Refreshing viewer from sample/nodejs-mongodb-example
Refreshing viewer from sample/nodejs-mongodb-example
Refreshing viewer from sample/jee-sample
Refreshing viewer from sample/jee-sample
Refreshing viewer from sample/jee-sample
Refreshing viewer from sample/jee-sample
Refreshing viewer from sample/nodejs-mongodb-example
Refreshing viewer from sample/nodejs-mongodb-example
Refreshing viewer from
org.jboss.tools.openshift.internal.ui.models.OpenShiftProjectUIModel@431dafbc
Refreshing viewer from
org.jboss.tools.openshift.internal.ui.models.OpenShiftProjectUIModel@431dafbc
{code}
--
This message was sent by Atlassian JIRA
(v6.4.11#64026)