Hello guys, is there any real world perf benchmarking to see the advantange of helix over reagent? After reading the README / playing with it / read the source code of helix, I see helix has quite some focus on rendering performance (e.g. it didn't use hiccup to avoid the cost). But I'd like to see some real world numbers.
I know helix is not only about performance - I'm aware of the simplicity provided by helix due to not adding an extra layer on top of vanilla react. But just curious about the overall performance comparison.
I am not sure if there is any atm. Do you know any such performance measurements, benchmarking suite that could be adopted?
On a quick google search there is https://www.metosin.fi/blog/implemeting-reagent-test-case-for-js-framework-benchmark/, which leads to https://github.com/krausest/js-framework-benchmark/
Hey @wxitb2017 👋 when developing hx (helix’s predecessor) I was working on a hiccup parser and was using some microbenchmarks to see how it performed compared with some other libs. At the time, reagent was about 1/4 the speed of doing direct calls to createElement and was probably the fastest hiccup interpreter
I don’t have a benchmark against reagent, but I do have a similar microbenchmark to measure performance regressions that compares helix’s macros to direct createElement calls, and my tests they are usually within 10% of each other
It’s not a very scientific way of comparing the two, but it gives you an idea
If you clone helix and run the :dev build, you can uncomment that form and the card below it to run the microbenchmark
It’s not indicative of a real world project, just how fast can you create elements, which is the biggest trade off that helix makes since it doesn’t use hiccup
I think @dominicm did was doing some benchmarks too, not sure if he is comfortable sharing
I did some size benchmarks, but not performance.
Those are still WIP
Ah right right
Thx @lilactown!
btw I have a small pr for helix https://github.com/Lokeh/helix/pull/43
Great! I’ll take a look in a bit
what's the appropriate way to pass an "array" of react components as children to a Fragment?
I went with (map) first but I am starting to have the feeling that although it works, it's not appropriate : D
@ashnur I think it's okay, helix calls (apply react/reactElement nil children)
and children could be any seq IIUC
thanks, I am very newb with clojure 😞, that looks exactly what I needed
https://github.com/Lokeh/helix/blob/0.0.10/src/helix/core.cljs#L62-L65
now that you point it out, I was looking elsewhere in the code. I am not there you to find these easily in clojure. Show me js code and I can read it fast. : )