Fork me on GitHub
Ben Sless07:10:17

I'm trying the membrane examples. Button clicks responses are very slow. Is it intentional?


They should not be slow. What's the example you're trying?

Ben Sless07:10:36

plenty. Tried the counter and todo list. anything relating to clicks was very slow to respond. text input was snappy in file picker. In the REPL it does not happen


Is it on linux or mac?


I haven't tested as much on linux. I'm wondering if it's not repainting on mouse input for some reason


What do you mean by "in the repl"?

Ben Sless07:10:47

I copied the example from the README and pasted it in the REPL

Ben Sless07:10:52

started with lein repl


and it's not slow when run from the repl?


oh weird. One more thing to check, if you add a println in a mouse handler, is it slow to print?


That would indicate that the problem is that it's updating the state, but not repainting after mouse inputs for some reason.

Ben Sless07:10:46

Okay the behavior is even weirder

Ben Sless07:10:02

in the beginning it was slow to print and react

Ben Sless07:10:17

but if i click a button several times it reacts quickly and prints quickly

Ben Sless07:10:22

moving to another button is slow again

Ben Sless07:10:27

and speeds up after several clicks


hmmm, that is weird


another thing to check is try running the todo app with the swing backend lein run -m membrane.java2d

Ben Sless07:10:14

Everything reacts immediately


ok, that means I'm probably doing something wrong when setting up GLFW that only manifests on linux


Thanks for helping me get more info here!

Ben Sless07:10:06

Gladly, if you need a test subject feel free to ping me


@UK0810AQ2, I tried to reproduce the problem with mouse clicks being slow to respond randomly. I have a virtual box setup that runs linux, but it's kinda slow to begin with. When you describe the response as slow, would you say it's very slow, is that 1. a few seconds 2. laggy (ie. less than a second which is still really slow for responding to a mouse click) Is there any other info about your setup that might be useful? • java version • linux distro and version

Ben Sless04:10:55

The slowness itself was variable, decreasing with more clicks Initial delay can be up yo a few seconds, and eventually decreased to be unnoticeable. Clicking on a fresh button had the same issue all over again, and the same for the original button afterwards Java version - think I'm running on 15 Linux - Ubuntu 21.4 with gnome desktop, GDM, Xorg and nvidia drivers. Pretty much a stock PopOS install

Ben Sless04:10:59

Would it be helpful if I provided you with a screen recording or live demo of the issue?


yea, that would be super awesome.


yea, a few seconds is pretty wild. I hate to ask too much, but I would love to see a flame graph, No worries if that is too much of a bother though.

Ben Sless05:10:17

No need to link flame graphs after I worked so hard to make my name synonymous with clojure performance in the past year 😄 I'll do a couple of other things, too. How does a JFR recording sound?

😆 1

What's a JFR recording?


I guess I should google it before sounding dumb


yea, that seems great

Ben Sless05:10:45

Imagine a visualvm playback with a ton of extra data

🆒 1
Ben Sless10:10:48

Well, I pulled the latest branch and can't recreate the slowness with any example

Ben Sless10:10:43

I can still run the fancy profiling etc. but I see little point now

👍 1

I did make change to reduce unnecessary draw call recently, but not sure that would directly address the symptoms. Anyway, I'll close the github issue for now and can reopen if the problem returns.

Ben Sless17:10:09

I'll be sure to report it if I stumble across it again, I like the idea of membrane and will probably bang my head against that wall to make things work with it, because it's cool

😆 1
🙏 1

Very cool. I have some cool new features in the works. Don’t hesitate to ping me if there anything I can do.

Ben Sless17:10:08

standard text editing capabilities will be 💯

Ben Sless17:10:27

just stupid text boxes with line wrap, etc

👍 1

:thumbsup: , I already have a few ideas in mind.

👍 1
Ben Sless07:10:07

Slightly easier reproducible builds would be nice, too, I would have wanted to build myself and not have to download a release

Ben Sless07:10:32

although I see the steps now in the yml


It should be reproducible now. I use github to build it now.

Ben Sless07:10:55

yes, by bad, I didn't think to check the CI file


np, it's relatively recent.

Ben Sless07:10:33

Is it possible to build on linux without update-alternative?


I'm not sure. What's update-alternative?

Ben Sless07:10:16

update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-9 60 --slave /usr/bin/g++ g++ /usr/bin/g++-9

Ben Sless07:10:25

update-alternatives --config gcc 

Ben Sless07:10:11

With stuff like adding a ppa and globally modifying build settings, it might be better for linux users to build inside a docker image


Yea, that makes sense. I think it should compile with any c++ compiler


I think I just copied that from stack overflow as the "recommended" way to install gcc


I am not much of an expert on c++ build systems (as you may be able to tell)

Ben Sless07:10:56

I am not an expert on the subject, either 🙂

Ben Sless07:10:17

mostly fumbling my way through

Ben Sless07:10:36

ended up compiling GCC once in the hunt for missing libraries 🙃

Ben Sless07:10:30

Would you say membrane is mature enough to build an application with or should I use another framework in the meanwhile? I like the design philosophy but if I had to be practical, what would you recommend?

Ben Sless07:10:32

With the intent of targeting all operating systems


Unless it's for personal or internal company projects, I think there's probably a few missing pieces right now 😕


I'm working on getting it there, but there are still some rough edges


Since it's easy to embed, it might be possible to use membrane's cljfx or swing backends


so that you can use membrane for some things and fall back to cljfx or swing for other things

Ben Sless07:10:42

I'm not an expert with cljfx or swing, I should start with one thing


I would pick cljfx over swing, but all of my recent desktop projects for the last few years have been electron apps, which is the reason I've been working on membrane


What kind of app would it be?

Ben Sless07:10:47

An API app, which would traditionally be written in Electron

Ben Sless08:10:40

by the way, with targeting SKIA, do you have any plans for cooperation with Tonsky?


potentially. There's also a skija backend


I'm still not sure what his UI library will end up looking like, but hopefully there will be some ways to benefit from each others work.


We did a live chat on youtube about a week ago,

👍 1
Ben Sless09:10:11

Wow this is super interesting Just 💯


His chat two weeks ago with Raph Levien was really interesting,