負荷が跳ね上がる時がある

This is a forum for requesting Arbor developers.
The items required for the request are as follows.
  • What are you trying to do with Arbor?
  • Specifically, where are you inconvenient and in trouble?
  • What should I do to improve?
Attention point:
  • We can not answer requests that do not know the detailed situation.
  • We can not answer your request for specific problems in the specification of your project.
  • We can not answer your request on Unity's specification issues.
  • We do not guarantee the implementation of your request.

ここは、Arbor開発者への要望を行うためのフォーラムです。
要望に必要な項目は以下の通りです。
  • Arborを使って何をしようとしているか。
  • 具体的にどこが不便で困っているか。
  • 改善するにはどうすればよいか。
注意点:
  • 詳しい状況がわからない要望については答えられません。
  • ユーザー様のプロジェクトの仕様上の固有の問題に対する要望については答えられません。
  • Unityの仕様上の問題に対する要望には答えられません。
  • 要望の実装を必ずお約束するものではございません。

Forum rules
The items required for the request are as follows.
  • What are you trying to do with Arbor?
  • Specifically, where are you inconvenient and in trouble?
  • What should I do to improve?
Attention point:
  • We can not answer requests that do not know the detailed situation.
  • We can not answer your request for specific problems in the specification of your project.
  • We can not answer your request on Unity's specification issues.
  • We do not guarantee the implementation of your request.

要望に必要な項目は以下の通りです。
  • Arborを使って何をしようとしているか。
  • 具体的にどこが不便で困っているか。
  • 改善するにはどうすればよいか。
注意点:
  • 詳しい状況がわからない要望については答えられません。
  • ユーザー様のプロジェクトの仕様上の固有の問題に対する要望については答えられません。
  • Unityの仕様上の問題に対する要望には答えられません。
  • 要望の実装を必ずお約束するものではございません。
kkk
Posts: 22
Joined: 2018/07/20 07:22

負荷が跳ね上がる時がある

Post by kkk »

Arbor FSM利用時、DataBranchの負荷が跳ね上がるときがあったので添付のようにキャッシュしてみました。
問題なければ対応してもらえると助かります。
AI処理にSubStateMachineを多用しているため、その時じゃないかと思っています。

何かに影響ある可能性もあるので、優先度は低いです。
User avatar
caitsithware
管理人
Posts: 493
Joined: 2015/08/17 12:41

Re: 負荷が跳ね上がる時がある

Post by caitsithware »

ご要望ありがとうございます。

Code: Select all

private DataBranch InputBranch
{
    get {
        if (_branch == null) {
            NodeGraph nodeGraph = outBehaviour as NodeGraph;
            if (nodeGraph != null) {
                DataBranchRerouteNode rerouteNode = nodeGraph.dataBranchRerouteNodes.GetFromID(outNodeID);
                if (rerouteNode != null) {
                    _branch = rerouteNode.link.GetInputBranch();
                }
            }
        }
        return _branch;
    }
}
private DataBranch _branch;

void Calculate()
{
	Calculator calculator = outBehaviour as Calculator;
	if (calculator != null)
	{
		calculator.Calculate();
	}
	else
	{
		var b = InputBranch;
		if (b != null)
			b.Calculate();
	}
}

public void SetDirtySlotField()
{
	_InputSlotField = null;
	_OutputSlotField = null;
	_branch = null;
}
のInputBranch、_branchの部分ですね。
実行中は基本的に接続状況が変わることもないため、ご提案された方法でキャッシュしても問題なさそうです。
影響範囲なども詳しく検証した上で反映しようと思います。

※添付していただいたファイルにつきましては、上記の通り変更点のみ抜粋いたしましたので削除しておきます。
kkk
Posts: 22
Joined: 2018/07/20 07:22

Re: 負荷が跳ね上がる時がある

Post by kkk »

対応ありがとうございました。
こちらもスロットを多用すると負荷の原因になっているのでキャッシュしています。
問題なければ対応して頂くと助かります。

よろしくおねがいします。
User avatar
caitsithware
管理人
Posts: 493
Joined: 2015/08/17 12:41

Re: 負荷が跳ね上がる時がある

Post by caitsithware »

ご提案ありがとうございます。
検討いたします。

※添付ファイルはダウンロードが済みましたので削除いたしました。
Post Reply