Optimization, performance etc.

FlowCanvas Forums Support Optimization, performance etc.

Viewing 15 posts - 1 through 15 (of 22 total)
  • Author
    Posts
  • #892
    szaruga
    Participant

    Hello. (Sorry for my English)

    I’ll do a simple thing:

    03-08-2016_01

    Created object (prefab) – it has flow script:

    2016-08-03_08-16-32

    When creating object – game stops for 1 sekund.
    Except to slowing down, everything seems to work, there are no errors.
    Does that mean a little more complicated things are not recommended? 🙁

    Additional info:
    – Unity: 5.3.2f1
    – Flow Canvas: 1.2.5b

    Attachments:
    You must be logged in to view attached files.
    #895
    Gavalakis
    Keymaster

    Hello,

    What kind of platform and specs is this happening on? This is quite a big delay there and maybe something is going wrong. Is it possible for you to send me the project to test it out?

    Also, have you tried the SpaceInvaders example game from the Downloads section, (which is also more complicated than the images above)? Does it also has a similar performance issue on your end?

    Let me know.
    Thanks.

    Join us on Discord: https://discord.gg/97q2Rjh

    #901
    szaruga
    Participant

    Hello
    (sorry for my english 🙂 )

    What kind of platform and specs is this happening on? ……………………………….

    Platform? hmm…
    Game Build —> Windows x86_64
    My PC —> Windows 8.1, i5-4460, RAM-16GB, GPU-GTX 750Ti, Crucial MX100 256GB

    ……………..(which is also more complicated than the images above)?………………

    My project is probably more complicated, i’m at the beginning of the road and i have about 80 macros, 40 global variables… one of many flow scripts:

    2016-08-07_15-28-16

    I think this is all too much complex and … whether FlowCanvas + NodeCanvas can handle this?

    But…
    I worked in Unreal Engine 4 with BLUEPRINTS and… examples:
    2016-08-07_16-13-04
    2016-08-07_16-11-31
    2016-08-07_16-09-07

    And everything worked very smoothly, i hope to get similar results by FlowCanvas and NodeCanvas.

    …………………. Is it possible for you to send me the project to test it out?
    ………………….

    I am ashamed to show my project 😉

    but…

    I was able to fix it:

    The problem posed in macros, mostly “Empty IO” (setting several variables and hiding some panels)
    Of course, these operations are executed only when the object is clicked.

    However…
    When macros moved to another object and executes them through event… delays disappeared.

    Important question —> it is the correct way?

    Regards 🙂

    Attachments:
    You must be logged in to view attached files.
    #914
    Gavalakis
    Keymaster

    Hello again,

    Sharing a screenshot of the flowscript helped. Indeed the delay here is caused by the many uses of Macros. The problem is that right now all Macros are being initialized when the root flowscript is enabled, so if there are a lot of Macros there (like in your case) initialization will be slow.
    I will fix this in the next update so that each Macro is instead initialized only when it is needed and this change will greatly increase the performance for when using a lot of Macros.

    Thanks again for your information!

    Join us on Discord: https://discord.gg/97q2Rjh

    #923
    szaruga
    Participant

    Hello (sorry for my english 🙂 )

    Thank you, and patiently wait for the patch 🙂

    And…
    I think my next issue also fits in thread.
    Still not much I can do and still a lot of learning ahead of me.
    I already know that in the programming, different things can do in different ways, I really like it, but I’m afraid of optimization

    My current problem is: “class versus structure”
    At the moment, items, objects and NPCs in my project are structures. in example:
    2016-08-20_16-54-45
    S_Item_Data = structure
    I did it because not fully understand how they work references (with classes). Before, they were is class, when the game was creating an object from Data Table, I had various errors. Roughly I understand why this happened.

    But, more important for me is something else:
    I was planning to buy —>
    https://www.assetstore.unity3d.com/en/#!/content/59863
    However, the seller explained to me, that I must to use classes instead of structures, if i want to use the package.
    At the moment, everything in my project seems to work fine (except for delays caused by macros 😉 )
    Leaving aside the question Visual Item Database, I could change the structures on classes (lot of work) and try to deal with references. But much more important is the question:

    What’s better for performance and general use, structures or classes? (especially in the situation described) and… (especially in FlowCanvas)

    Attachments:
    You must be logged in to view attached files.
    #927
    Gavalakis
    Keymaster

    Hey,

    Generally speaking structures are faster than classes, but that difference mostly comes in play in certain situations. MSDN has a nice article about the differences: [LINK]

    FlowCanvas can work with both classes and structures the same and the most commonly performance issue with structures (value boxing), is not happening in FlowCanvas either, except in the case of when data “travel” in and out of a Macro, in which case a structure will be boxed/unboxed.

    Join us on Discord: https://discord.gg/97q2Rjh

    #947
    szaruga
    Participant

    “I will fix this in the next update so that each Macro is instead initialized only when it is needed and this change will greatly increase the performance for when using a lot of Macros.”

    Not available yet? I check version 1.3, but the game still runs more than a minute

    #948
    Gavalakis
    Keymaster

    Hello,

    I am very sorry that I wasn’t able to fit the Macro improvement in the new version 1.3 🙁
    I really had to send the new update 1.3 due to the many changes there were and other older requests, but I am already working on the new one with the Macro instantiation fix.
    Once again, I’m very sorry that this did not make it in the the current version.

    Join us on Discord: https://discord.gg/97q2Rjh

    #949
    szaruga
    Participant

    Ok, I’m waiting patiently.

    #1346
    szaruga
    Participant

    Are you planning to add something like the Unreal Blueprints’ “find references” feature? It’s a very useful thing that lets you find all references to a variable, function, macro etc. in multiple graphs. See the screenshot for an example how it works (never mind the strange name of the thing being searched for, it’s probably a result of opening an old project in a new version of Unreal).

    Attachments:
    You must be logged in to view attached files.
    #1348
    Gavalakis
    Keymaster

    Hello,

    I was planning to add a find references for nodes that use a specific blackboard variable, but maybe I could expand this to find references for other things as well (like as you said macros), or certain functions. This is certainly not an easy thing to add, but I also think it is quite useful to have 🙂
    Thanks for the suggestion.

    Join us on Discord: https://discord.gg/97q2Rjh

    #1351
    amoka
    Participant

    Hi,

    I agree this search functionality would be essential addition to FlowCanvas. I always use the search tool a lot when doing traditional coding, so I am missing this feature much in FC.

    #1352
    Gavalakis
    Keymaster

    Thanks for your input.

    Join us on Discord: https://discord.gg/97q2Rjh

    #1356
    nicoyiqi
    Participant

    hey,everyone,I recently create a method to find node in graph,thought inspired by the new release feature : relay node.

    The “find” node, like this.

    12

    you can search to find the node which name contain input text.

    by click the select button, you can select that node. and I also add new function to focus the selected nodes, just press “F” ;

    click control+ f ,to select this find node directly;

    beside, I modify the relay node code, add relay flow node, and select corresponding input or outPut node more convenient.

    2

    3

    here is the unitypackage, just cover the source files.

    findnode

    Attachments:
    You must be logged in to view attached files.
    #1361
    nicoyiqi
    Participant

    I find a bug : when duplicate a node, the new node’s UID does not change, that cause relay out node’s relay input value node reference still point to old node instead of new duplicate node.

    the solution is add follow code in Node.cs after line 219 :

Viewing 15 posts - 1 through 15 (of 22 total)
  • You must be logged in to reply to this topic.