A few questions related to performance

My questions:
i have dynamic data model.
i binded shape visibility, color and other all properties to my shape.
i manage these properties with a key.
İf active key data is not null in node data then i return active view values(color,boderderColor,stroke,vs…).

example node color binding:
function(sourceData, node){
return sourceData.nodeConfigs[this.getActiveView()].color
return this.defaultColor;

I use geometry string to get the shape I want.
i have a panel and i binding “itemArray”.
Shapes in item array have binding methods.
Suppose that these shapes consist of 5 parts and i have 6 bindings method and diagram in nodes count 1000.
in this case 30.000 function runned.
is it true ?

example calculate:

(shape count) * (binding method count) *(node count)=Runned function count

only for click event or other events runned function count calculated.

What is your question regarding performance?

If you are just trying to bind to properties of a property whose value is an Object, see Binding data sub-properties

Also see:

I edited the first post.
can you answer the question again ?

It’s hard for me to understand exactly what the performance questions are. Yes, if you have that many objects and bindings, at least at load time there will be that many binding evaluations, if not more. But in your example, 30000 is a small number for 1000 nodes when each node is so complicated.

When might the value of this.getActiveView() change?

User can change it at any time.
At any time after installation.
you can even add a few objects and add a new view to “activeView”.
When you do this, a blank page will welcome you no matter how many nodes are on the diagram

other question
As far as I can tell, “gojs” libraries are running all bind methods in the slightest change.
for example event “select object” or i call “diagram.updateAllTargetBindigs”.
and gojs can run all items binding methods?

It almost sounds as if each view were separate layers or even separate diagrams. If that is the case and you are worried about performance, it might make sense to implement them as separate models shown in a single diagram with a single fixed view.

Regarding binding evaluations: that depends on how you defined the bindings, which is still unclear to me. Normally selection would not affect any bindings.

But yes, you would expect that calling Diagram.updateAllTargetBindings would evaluate all Bindings for all GraphObjects.

I need a list of models to implement as separate models. It’s like a worse method.
Using an external key, I get the right data from all the viewdata on “node.data”.

Is there an alternative method for Diagram.updateAllTargetBindings ?
I use this when I change the property of any object.
Other methods on the site seemed to be refreshing later.

I have no idea of what all the dependencies are in your app. So I really cannot say.

Is everything working correctly and efficiently enough with a largest-possible diagram test case? If not, you’ll need to be a lot more detailed describing the relationships of various objects and how those objects and those relationships might change.

Is there an alternative method for Diagram.updateAllTargetBindings ?

That depends on precisely what you need to do. Which I still do not understand for your app.

i want change view of when change the data of an object,

That could mean any number of scenarios that I could imagine. You’ll need to be a lot more specific describing the objects and their relationships.