question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Performance Issues

See original GitHub issue

Hi!

First off I’d like to give my thanks for creating this library, we’re enjoying using it on our project.

I would like to discuss some performance issues we’re having, potential fixes, and whether these are something you may consider being part of the core library offering.

Initially, I’d like to share a screenshot of our graph, so you can get an idea of what we’re working with.

image

Now, we’re facing several issues:

  • Load time takes 1min+ in Firefox, and even longer in chrome.
  • Connecting nodes on the edges, can take 15-20s+ on chrome (although stay within a couple of seconds in Firefox strangely).

I’ve boiled this down to the fact that CalculateOrder function, which runs every time we CheckConnection, is run:

  • Every time we load a graph, the library attempts to re-add every node’s connection and this function gets called for every node X>Y
  • Every time we try to connect 2 node’s (after load).

Here’s what happens every time a node is connected:


Suggested changes?

  1. Allow the CalculateOrder check for each node to be optional when calling load, it doesn’t seem like there’s always a need to do that when we’re already running the checks every connection we add. This change alone make’s load run in <1s for FF/Chrome

  2. Decouple the generation of baklava node execution order, from the cycle checking.

Myself (and perhaps others) are actually just using Baklava as a graph rendering Vue library (then using the save/load feature when done, and running the graph on the server using our own execution logic).

If we were to remove the BFS check / make it optional via some sort of opt in engine config parameter, it speeds up node connection (worse case) from ~20s to ~2s in chrome. It must be noted I am noticing weird behaviour in the fact Firefox seems to be able to handle the stack generated here of ~5mil items on some connections extremely fast, compared to chrome which completely chokes.


Would appreciate any thoughts you have regarding the above!

Thanks

Issue Analytics

  • State:closed
  • Created a year ago
  • Reactions:1
  • Comments:7 (4 by maintainers)

github_iconTop GitHub Comments

1reaction
TigerHixcommented, May 14, 2022

Myself (and perhaps others) are actually just using Baklava as a graph rendering Vue library (then using the save/load feature when done, and running the graph on the server using our own execution logic).

Second this!

0reactions
newcatcommented, May 21, 2022

Implemented in v1.10.0

Read more comments on GitHub >

github_iconTop Results From Across the Web

Dealing with Performance Problems
Types of Performance Problems ; Quantity of work (untimely completion, limited production). Poor prioritizing, timing, scheduling; Lost time ; Quality of work ( ......
Read more >
Handling Performance Issues With Grace | Monster.com
Low Productivity or Late Completion – Make sure you've been clear about the requirements and expectations of the job. · Poor Quality of...
Read more >
Top 5 Common Performance Problems - HRCI
Top 5 Common Performance Problems · Shallow Work · Inability to Prioritize · False Sense of Urgency · Productive Procrastination · Low-Quality Output....
Read more >
5 Common Reasons for Performance Issues (Plus 3 Tips to ...
1. They lack knowledge or skill. · 2. They have unclear or unrealistic expectations. · 3. They aren't motivated. · 4. The job...
Read more >
What is a performance problem? - IBM
Generally, a performance problem is the result of some workload not getting the resources it needs to complete in time. Or the resource...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found