-
-
Notifications
You must be signed in to change notification settings - Fork 121
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
Performance Issue with Large Flows #106
Comments
Here is a flow that shows the issue. It is encrypted using the same password I sent you for the other issue. |
@ColtonMcInroy I tested your example and it worked perfectly. No performance issues when rendering, but I'm using a Macbook Air M1. I found a problem with the Teleport component and your Function component. Just update the source-code by adding 2 lines of code: https://github.com/totaljs/flowstreamcomponents/blob/main/components/teleport.html#L161 |
On three different systems this flow has been tested and experiences the same problem. I myself have tested both Firefox and Brave (Chrome based) on two different linux computers (6th gen and 11th gen Intel i7) with the same issue and another person tried it on their computer with the same issues. Scrolling shows the issue, especially scrolling fast up/down or clicking and dragging. Scrolling up/down fast results in part of the screen going completely grey (Dark mode theme) without a grid and after a second or two the redraw finishes and I can see the flow properly. If I drag to scroll, let go, and then click to drag again, often the pointer reference and redraw has not completed, so the pointer actually grabs things not where I have clicked to drag. Thanks for the info about Teleport/Function components. I updated the Teleport component, and made adjustments to my Function component as per recommendation. |
Also, when actually working within the code editor of the Code component, typing performance is effected as well. At times the cursor hangs, then all of a sudden outputs the missing typed characters. Same thing with trying to move the cursor around by clicking or but pressing arrows. |
I will test it on various devices on Tuesday/Wednesday. |
@ColtonMcInroy I'm analysing your Flows. You uploaded two files and two issues, which I missed. I can confirm the poor performance. I will try to improve performance in your case, but you have a very specific case. I will analyse the Flow designer/editor more deeply this week. |
Hey @petersirka I also noticed another issue now. I stopped TotalJS Flow and then restarted it and it takes forever for all the flows to start up. It appears that the flows get initiated in the order which they were added to TotalJS Flow and it took probably more than 30 minutes to start all the flows. I started TotalJS Flow waited like 5 minutes and I could see that 2 flows started, and the rest seemed to be doing nothing. I can tell if flows start because one of the main components in the flows when initiated outputs some log information. |
@ColtonMcInroy I know about this bug and it was fixed in the Total.js framework. Please update the Total.js framework via NPM or manually. |
I am currently using version is 0.0.87. According to the link you provided the fix was applied on version 0.0.85 so I should already be using a fixed version. |
@ColtonMcInroy and does the problem still exist? |
Affirmative |
@ColtonMcInroy please check if the Total.js version is correct in the workers. With the exception of you, we don't have any loading issues. |
Maybe we can prepare a special Flow version with debugging tools. Then we will see where it stops. |
@ColtonMcInroy I have improved performance in the 'j-Flow' component. You can test it by updating the source-code or a bundle from GitHub. |
Thanks, I will take a look when I have a moment and let you know |
I did a git pull, updated total4, and restarted flow today. So far the UI seems considerably better. Checking profiling in FF shows that the massive lag caused by Document.querySelectorAll no longer appears to be occurring and the UI is much more responsive. |
There appears to be a major performance issues once a flow becomes larger.
The following image I actually sent to @petersirka already in private chat, but now I think it is best to be covered here.
This image shows firefox profile of about 8 seconds. During this time I had a flow with about 800 nodes and just dragged to move around within the flow. Every time I move the flow, it appears to hang while it performs lots of Element.querySelectorAll calls. This becomes especially painful if there are "Print JSON" components displaying lots of information.
Once the flow becomes large, this type of behaviour becomes a huge problem. If you drag and move, then try to do it again, sometimes the pointer reference hasn't been updated correctly yet, so it will actually start dragging components you have not selected. Attempting to open a components settings becomes very slow, and the "Code" component editor in the settings sometimes has issues initiating due to this performance problem.
I have not done dived into the TotalJS/Flow code too much yet, but based on the call tree it would appear to me that something in the repositioning process is searching the DOM tree rather than using references.
The text was updated successfully, but these errors were encountered: