membrane 2021-10-07

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?

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"?

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

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.

Okay the behavior is even weirder

in the beginning it was slow to print and react

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

moving to another button is slow again

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

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!

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

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

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.

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.

standard text editing capabilities will be πŸ’―

just stupid text boxes with line wrap, etc

πŸ‘ 1

@ben.sless, 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

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

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, https://github.com/clojure-goes-fast/clj-async-profiler. No worries if that is too much of a bother though.

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

Imagine a visualvm playback with a ton of extra data

πŸ†’ 1

πŸ‘ , I already have a few ideas in mind.

πŸ‘ 1

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

although I see the steps now in the yml

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

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

np, it's relatively recent.

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

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

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

update-alternatives --config gcc 

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)

I am not an expert on the subject, either πŸ™‚

mostly fumbling my way through

ended up compiling GCC once in the hunt for missing libraries πŸ™ƒ

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?

For desktop?

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

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?

An API app, which would traditionally be written in Electron

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, https://www.youtube.com/watch?v=Nk6mcyv7Sz4

πŸ‘ 1

Wow this is super interesting Just πŸ’―

His chat two weeks ago with Raph Levien was really interesting, https://www.youtube.com/watch?v=PwuwG2-0n3I