leon-thomm / Ryven

Flow-based visual scripting for Python
https://ryven.org
MIT License
3.76k stars 439 forks source link

Is there a way to create sub-flow? #193

Closed chuteany closed 2 months ago

chuteany commented 2 months ago

Is there a way to create sub-flow like PyFlow`s subgraphs or Baklavajs Subgraphs

leon-thomm commented 2 months ago

No. It existed in the past, but I figured this is not a feature that Ryven should generally have by default.

chuteany commented 2 months ago

So, if I want to develop this feature myself, could you please give me some guidance?

leon-thomm commented 2 months ago

It really depends what you are trying to achieve, I will try to help if you can give me more details. I think in most cases the flow representation should only exist at the presentation layer. When one is not actively interacting with a flow anymore, it should usually be compiled into a lower-level representation that is more efficient than the flow optimized for the UI representation. If in your use case the graph itself is not involved in expensive computations, you can probably keep a separate instance of the represented ryvencore flow in your node, which is reasonably efficient; something like that.