membrane

Ben Sless 2021-10-07T07:02:17.036Z

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

phronmophobic 2021-10-07T07:03:44.036600Z

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

Ben Sless 2021-10-07T07:10:36.038400Z

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

phronmophobic 2021-10-07T07:11:32.038700Z

Is it on linux or mac?

Ben Sless 2021-10-07T07:11:42.038900Z

linux

phronmophobic 2021-10-07T07:12:26.039900Z

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

phronmophobic 2021-10-07T07:13:30.040700Z

What do you mean by "in the repl"?

Ben Sless 2021-10-07T07:13:47.041500Z

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

Ben Sless 2021-10-07T07:13:52.041900Z

started with lein repl

phronmophobic 2021-10-07T07:14:07.042200Z

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

Ben Sless 2021-10-07T07:15:01.042700Z

correct

phronmophobic 2021-10-07T07:15:47.043600Z

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

Ben Sless 2021-10-07T07:16:05.044200Z

let's see

phronmophobic 2021-10-07T07:16:35.044800Z

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

Ben Sless 2021-10-07T07:17:46.045Z

Okay the behavior is even weirder

Ben Sless 2021-10-07T07:18:02.045400Z

in the beginning it was slow to print and react

Ben Sless 2021-10-07T07:18:17.045800Z

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

Ben Sless 2021-10-07T07:18:22.046100Z

moving to another button is slow again

Ben Sless 2021-10-07T07:18:27.046400Z

and speeds up after several clicks

phronmophobic 2021-10-07T07:19:02.046600Z

hmmm, that is weird

Ben Sless 2021-10-07T07:19:26.046800Z

yeah

phronmophobic 2021-10-07T07:20:31.047700Z

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

Ben Sless 2021-10-07T07:22:36.048200Z

checking

Ben Sless 2021-10-07T07:23:14.048500Z

Everything reacts immediately

phronmophobic 2021-10-07T07:23:59.049300Z

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

phronmophobic 2021-10-07T07:24:47.050Z

Thanks for helping me get more info here!

Ben Sless 2021-10-07T07:25:06.050400Z

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

Ben Sless 2021-10-15T10:06:48.107300Z

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

Ben Sless 2021-10-15T10:25:43.107500Z

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

πŸ‘ 1
phronmophobic 2021-10-15T17:21:48.108200Z

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 Sless 2021-10-15T17:28:09.108400Z

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
phronmophobic 2021-10-15T17:37:41.110100Z

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

Ben Sless 2021-10-15T17:45:08.110300Z

standard text editing capabilities will be πŸ’―

Ben Sless 2021-10-15T17:46:27.110500Z

just stupid text boxes with line wrap, etc

πŸ‘ 1
phronmophobic 2021-10-15T03:39:14.090800Z

@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

Ben Sless 2021-10-15T04:35:55.091100Z

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 Sless 2021-10-15T04:36:59.091300Z

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

phronmophobic 2021-10-15T04:55:10.091600Z

yea, that would be super awesome.

phronmophobic 2021-10-15T04:57:30.091800Z

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.

Ben Sless 2021-10-15T05:06:17.092100Z

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
phronmophobic 2021-10-15T05:06:49.092300Z

What's a JFR recording?

phronmophobic 2021-10-15T05:07:23.092500Z

I guess I should google it before sounding dumb

phronmophobic 2021-10-15T05:08:07.092800Z

yea, that seems great

Ben Sless 2021-10-15T05:09:45.093Z

Imagine a visualvm playback with a ton of extra data

πŸ†’ 1
phronmophobic 2021-10-07T07:25:45.050800Z

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

πŸ‘ 1
Ben Sless 2021-10-07T07:31:07.051700Z

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

Ben Sless 2021-10-07T07:32:32.052400Z

although I see the steps now in the yml

phronmophobic 2021-10-07T07:32:34.052500Z

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

Ben Sless 2021-10-07T07:32:55.052900Z

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

phronmophobic 2021-10-07T07:33:13.053200Z

np, it's relatively recent.

Ben Sless 2021-10-07T07:33:33.053700Z

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

phronmophobic 2021-10-07T07:34:31.054100Z

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

Ben Sless 2021-10-07T07:35:16.054400Z

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

Ben Sless 2021-10-07T07:35:25.054700Z

update-alternatives --config gcc 

Ben Sless 2021-10-07T07:36:11.055600Z

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

phronmophobic 2021-10-07T07:37:47.056300Z

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

phronmophobic 2021-10-07T07:38:29.057Z

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

phronmophobic 2021-10-07T07:39:15.057600Z

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

Ben Sless 2021-10-07T07:40:56.057800Z

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

Ben Sless 2021-10-07T07:41:17.058Z

mostly fumbling my way through

Ben Sless 2021-10-07T07:41:36.058500Z

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

Ben Sless 2021-10-07T07:46:30.060400Z

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?

phronmophobic 2021-10-07T07:47:03.060600Z

For desktop?

Ben Sless 2021-10-07T07:47:07.060800Z

yes

Ben Sless 2021-10-07T07:47:32.061600Z

With the intent of targeting all operating systems

phronmophobic 2021-10-07T07:48:10.062300Z

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

Ben Sless 2021-10-07T07:48:42.063Z

😞

phronmophobic 2021-10-07T07:48:58.063300Z

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

phronmophobic 2021-10-07T07:50:10.064Z

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

phronmophobic 2021-10-07T07:50:37.064600Z

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

Ben Sless 2021-10-07T07:51:42.066100Z

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

phronmophobic 2021-10-07T07:52:44.067400Z

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

phronmophobic 2021-10-07T07:54:06.068100Z

What kind of app would it be?

Ben Sless 2021-10-07T07:55:47.068500Z

An API app, which would traditionally be written in Electron

Ben Sless 2021-10-07T08:04:40.069100Z

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

phronmophobic 2021-10-07T08:05:04.069400Z

potentially. There's also a skija backend

phronmophobic 2021-10-07T08:06:10.070300Z

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.

phronmophobic 2021-10-07T08:06:44.070700Z

We did a live chat on youtube about a week ago, https://www.youtube.com/watch?v=Nk6mcyv7Sz4

πŸ‘ 1
Ben Sless 2021-10-07T09:25:11.071800Z

Wow this is super interesting Just πŸ’―

phronmophobic 2021-10-07T08:07:36.071300Z

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

Ben Sless 2021-10-07T08:13:54.071600Z

πŸ‘