A new prototype for Isomorphic Crystal (pure Crystal GUI framework)

5 Likes

I installed it, MyApp works, but uses 100% CPU.
Linux Mint 21.2, Crystal 1.9.2, LLVM 15.0.7

I am not sure what it means.
Here is the copy of my monitor under Mac.
(it does not seem to use 100% of the memory available on the machine (see at the very bottom of the monitor screen))

No, but he said CPU not memory, which is at 100% for a seemingly simple UI.

My mistake! Thanks.
However, I still don’t know.

  • Perhaps a bug in Kemal ?
  • Alternatively, it could be a problem with WebView…

I’ll look into it in September, because I’going on holidays in August.

  • Perhaps, there’s a loop in the code that does apparently nothing else that consuming CPU…

Problem sovled : Changed “Thread.new()” into “spawn()” (using fibers instead of threads, basically).

CPU usage is back to 0.1%.

1 Like

Yes, very low CPU usage now, probelm solved.
Thank you Serge!

I’m glad you find this prototype interesting.

I added a few additional widgets, and a simple persistence mechanism (and also a simplistic menu (as links, for now)).

I intend to simplify all that, little by little.

I think there’s a niche for it.

For instance, for very simple interfaces, I believe that GTK, FLTK, etc. are, on one hand overkill and paradoxically, on he other hand, too limited graphic wise (hard to customize).

If you want to experiment with layouts, graphical appearance, the CSS which is used (via pico.cr) is pico css, therefore most of the features of pico css are available in the current version of the framework.

Serge.

Linux Mint 21

There was one dependency and that is to install libwebkit2gtk-4.0-dev
I also had to change the value of PORT in src/gui/settings.cr as I already was
using port 3000.

I was able to follow the rest of the instructions and ran the application.
Great work.

You’re right.

I’ll modify the README file accordingly.

Perhaps, it would be better to let the app detect a free port automatically.

Thank you for your feedback.

I also had to install gtk±3.0
Package gtk+-3.0 was not found

Thank you. I will update the README accordingly.

You could also use a config file to store the application settings so you do not have to recompile the entire application, just a thought.

1 Like

Excellent idea.

That could be an option.