Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Is there a way to solve the issue of importing a large amount of data? #879

Open
pakornC opened this issue Jun 18, 2024 · 1 comment
Open

Comments

@pakornC
Copy link

pakornC commented Jun 18, 2024

I tried importing around 400 nodes of data, but the web browser froze completely. Is there any way to help with the data import process?

@converseKarl
Copy link

you will find its about 180-250 nodes is about reasonable. I rewrote some code to speed up node rendering on the drawflow library, some other posts here from Jero make useful suggestions. What i would say is keep your node limit <250/200. Too much on the screen anyway makes the experience impossible.

The real trick is to use the modules.
When loading the JSON

  1. Create tabs, set the attribute and click and labels map to tabs
  2. Load in about 150-250 items per tab max
  3. Split up any flows into logical tabs and link there with a flow in and out or connector
  4. On click of tab clear the drawflow area, load the module data for that tab
  5. One thing to think about is making sure all your nodes on current tab keep state (any UI HTML changes) if you have them visible in the node itself (using html save api in the library on node losing focus before switching tabs

It's a bit of work but not too onerous with reasonable web script skills, and you can build 50, 100, 150 tabs and the switching loading of data can be quite fast.

This way you can build entire projects, with thousands of nodes and many flows

I would also disable the mini map or stop it's events synching in near real time by throttling because it hammers performance.

So in short

  1. Add function to set the tabs (li), set it as active, and json import that module to that tab
  2. Switching tabs (click/change - li) clean up current tab/updates , remove drawflow (clear), allow tab the switch and use eventing, the new tab becomes active, and loads its matching module name from the editor.drawflow.drawflow[module] using the tab name text as the reference key
  3. Import the flow from that module into that tab

Hope this helps

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants