nodes: optimize node graph changes by only updating from inputs that changed
A huge optimization that ensures only the parts of a node graph that have changed get pushed to the renderer. For thread-safety, the node graph is copied elsewhere so that users can make changes asynchronously and the graph can update when its threads are ready. Up until now, if an input value changed, every node's values would be re-copied, or worse, if a connection was changed, the entire graph would be recopied. This has been negligible in testing since we've been largely testing with small graphs, but for massive projects, it's important that this be as optimized as possible.
This commit is contained in:
+10
-2
@@ -49,7 +49,7 @@ public:
|
||||
NodeInput(const QString &id, const DataType& type, const QVariant& default_value);
|
||||
NodeInput(const QString &id, const DataType& type);
|
||||
|
||||
virtual bool IsArray();
|
||||
virtual bool IsArray() const;
|
||||
|
||||
/**
|
||||
* @brief Returns kInput
|
||||
@@ -270,8 +270,16 @@ public:
|
||||
|
||||
static QVariant StringToValue(const DataType &data_type, const QString &string);
|
||||
|
||||
void GetDependencies(QList<Node*>& list, bool traverse, bool exclusive_only) const;
|
||||
|
||||
QList<Node*> GetDependencies(bool traverse = true, bool exclusive_only = false) const;
|
||||
|
||||
QList<Node*> GetExclusiveDependencies() const;
|
||||
|
||||
QList<Node*> GetImmediateDependencies() const;
|
||||
|
||||
signals:
|
||||
void ValueChanged(const rational& start, const rational& end);
|
||||
void ValueChanged(const TimeRange& range);
|
||||
|
||||
void KeyframeEnableChanged(bool);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user