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

Very slow clog-builder #247

Closed
simendsjo opened this issue Nov 22, 2022 · 22 comments
Closed

Very slow clog-builder #247

simendsjo opened this issue Nov 22, 2022 · 22 comments

Comments

@simendsjo
Copy link

Selecting components takes several seconds while populating the list on the right. Tested with sbcl 2.2.10 on Linux 6.1-rc6 with FF nightly 107 and Chromium 107.0.5304.110. What's a good way to try to locate the source of this? sb-sprof? Some web tools?

@rabbibotton
Copy link
Owner

rabbibotton commented Nov 22, 2022 via email

@simendsjo
Copy link
Author

Are you using the latest builder? Do a (ql:update-all-dists) Was it working well and then became slow?

Cloned from github. Tried using the version in Ultralisp, but get the same behavior. I haven't been using it before, so I'm not sure when it became slow. Here's a screenshot of what's happening when I press a button in the gui builder. As you can see, it takes several seconds and looks quite chatty.

image

@rabbibotton
Copy link
Owner

The builder is a fairly chatty app with the browser, but on the same machine it is very responsive (for others :)
Ok, so let see in chrome open -> more tools -> developer tools
Let me know if see anything on the console in the dev tools should be just:

connecting to ws://127.0.0.1:8080/clog
connection successful

@rabbibotton
Copy link
Owner

rabbibotton commented Nov 22, 2022

I am upgrading sbcl now also to 2.2.10 so let's see if I see a diff with that.

@simendsjo
Copy link
Author

simendsjo commented Nov 22, 2022

Let me know if see anything on the console in the dev tools should be just:

I get the following errors:
image

@simendsjo
Copy link
Author

This is what I got in FF, but I got it already when opening a new panel editor.
image

@rabbibotton
Copy link
Owner

I'll look into why those errors show on Linux (not seeing it on Mac), something do to with setting up the ctrl key handlers, but that would not create an issue beyond the ctrl-s key not saving.

sbcl 2.2.10 on Mac works well. So not that either.

Later today I'll try and run through test in my Linux box.

To confirm the slow down is in the CLOG Builder when editing a .clog file or in the Project Window when you start?

@simendsjo
Copy link
Author

To confirm the slow down is in the CLOG Builder when editing a .clog file or in the Project Window when you start?

In the Builder when selecting a component as the right and bottom-left panels are being filled. I can move and resize the components without any lag. So it looks like it's related to loading these panels.

@rabbibotton
Copy link
Owner

Perfect, I will run some tests. Will find it :)

@simendsjo
Copy link
Author

Tested on Windows 10 with sbcl 2.2.5 now, and everything is snappy 👍
So related to Linux, sbcl 2.2.10, something locally on my machine or similar.

@rabbibotton
Copy link
Owner

I still didn't have chance to run some tests on my linux box, so will keep ticket active a bit longer.

@rabbibotton
Copy link
Owner

I am seeing sluggish performance on 2.1.11 on Ubuntu Linux, I will try and track down what is causing it.

@rabbibotton
Copy link
Owner

Just keeping you in loop, it is not a race condition on the clog side, so will take me a bit longer. It must be that some property I am requesting takes longer for the browser to answer about on Linux then on Windows or Mac. Still a bit strange.

@simendsjo
Copy link
Author

Yes, seem to remember it indicated a relation to polling, so it might be below clog.

@simendsjo
Copy link
Author

Same result with SBCL 2.2.11. But I tried just moving the mouse, which causes a lot of poll requests. Could this be related? Moving the mouse for 10s triggered 12k poll events and quite a lot of CPU usage. I don't have a Windows box handy, so I cannot check if this is Linux specific.

image

@rabbibotton
Copy link
Owner

will hunt down the speed issue soon, just been busy with the non-virtual issues this week (flying around a bit, new grand child etc)

@simendsjo
Copy link
Author

(..) new grand child (..)

Congratulations! The true joys of live :)

(..) will hunt down the speed issue soon (..)

No stress, I'm just adding some information that might be relevant as I investigate. Don't know how to profile clog/CL yet though.

@rabbibotton
Copy link
Owner

I made a change in the builder that should increase speed considerably. Can you please update to head and let me know how it is working on your system? sorry for the long delay

@simendsjo
Copy link
Author

I made a change in the builder that should increase speed considerably. Can you please update to head and let me know how it is working on your system? sorry for the long delay

It's a lot faster, but it's still pretty slow. It also looks like it's doing the same operation several times.

clog-slow-2022-12-09_20.01.59.mp4

@rabbibotton
Copy link
Owner

fantastic, I will look in to why repeating the selections and I have a few more optimizations. It seems the bottle neck is the actual UI elements on Linux UIs, in particular the drop downs. For example take a look at the update to the left/right while dragging an object around, hundreds of round trip network msgs no issue. On Mac these are all lightening fast.

@simendsjo
Copy link
Author

By pressing the button back and forth, it looks like I triggered a race condition of some sort. Probably unrelated..?

image

@rabbibotton
Copy link
Owner

The errors and speed issues should be cleared up. Sorry for delays. Please reopen ticket seeing lags.

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