fulcro

Book: http://book.fulcrologic.com, Community Resources: https://fulcro-community.github.io/, RAD book at http://book.fulcrologic.com/RAD.html
raspasov 2021-03-02T03:36:00.138200Z

Copilot sounds like an interesting idea. From the description I read here https://www.fulcrologic.com/copilot, is it fair to say that the novel aspect of it is the “runtime analysis to find problems while you’re writing code”?

raspasov 2021-03-02T09:53:07.145100Z

Question about fulcro (I’ve never used it in a project, but have dabbled in the documentation; also used Om.next in many projects in the past, so I’m familiar with the overall ideas): Does fulcro always re-render from the root? Or is there a strategy where it tries to optimize so that, let’s say, only a leaf component is re-rendered? In most apps, re-rendering from the root along a path to a leaf component is perfectly OK, esp. when using immutable data structures. But I’m working on an app that is quite CPU heavy under certain conditions (does ML analysis of live video) and I’m trying to minimize any re-rendering possible (even minor re-rendering is causing the ML algo to slow down, and that’s not good).

2021-03-02T10:00:15.146500Z

@raspasov I'm not an expert re: optimizing for performance but you can have a look at the rendering options here https://book.fulcrologic.com/#RenderingOptimizations

raspasov 2021-03-04T15:02:05.163700Z

Thank you for the input 🙂 I’ll watch the video.

tony.kay 2021-03-04T21:22:01.169600Z

Also, realize that a lot of the overhead is in dev mode: Inspect + React error checks both eat up a lot of CPU.

tony.kay 2021-03-04T21:26:26.169800Z

oh, duh, you should probably start with :only-refresh 😄

tony.kay 2021-03-04T21:27:28.170Z

and synchronous transactions (which do a sync refresh of only the component that invoked it). Both require there be idents on things, but that is normally what you’ve got.

raspasov 2021-03-05T08:18:38.174Z

Yes, I realize the dev mode has significant overhead (I primarily do React Native); But I know that if things are snappy and fast in dev then I wouldn’t have to worry about in a production build either; recently I’ve been using DataScript (not through fulcro, just direct React interop + querying datascript often); With that setup I ran into some significant perf. problems; so actually most of my performance problems were with DataScript and not the React re-rendering; I kinda solved it by putting an atom in front of DataScript to act as sort of a cache which I can do most of my query and logic out of so that I’m not going back to DataScript for every single data piece I need.

raspasov 2021-03-02T10:01:53.146800Z

@myguidingstar thanks for the pointer, will take a look

raspasov 2021-03-02T10:09:53.147100Z

This seems to be what I was looking for, thank you!

😉 1
Henry 2021-03-02T16:02:24.147600Z

For more details, do check out this video from Tony's Grokking Fulcro series as well: https://www.youtube.com/watch?v=yq49mMwlH1c

👍 1
👆 1
tony.kay 2021-03-02T17:13:02.148700Z

The video is definitely worth watching if custom rendering is what you’re after. That, and floating roots

tony.kay 2021-03-02T17:39:03.149800Z

So, you could do something as radical as putting in a flag that completely disables rendering refresh during critical times, and then do a full-rerender when you unset the flag

Jakub Holý 2021-03-02T17:41:06.151700Z

FYI https://fulcro-community.github.io/ is liveeeeeeeeeee! This site hosts rendered versions of the tutorials (including https://fulcro-community.github.io/guides/tutorial-minimalist-fulcro/index.html). Sorry for any broken links! Please help me check that it is OK and that the migration has not broken anything essential! If anyone was so inclined, I would very much appreciate help with improving https://docs.antora.org/antora/2.3/navigation/ and overall improvements to the look and feel of the site 🙏 (there is also a https://github.com/fulcro-community/fulcro-community.github.io/blob/master/todo.md)

👏 7
Jakub Holý 2021-03-04T10:04:25.154400Z

BTW I have refactored in into the antora structure and fixed links.

2021-03-02T17:59:58.152500Z

@holyjak I can translate the eql tutorial into adoc today

😻 1
2021-03-02T20:02:39.152900Z

@holyjak Converted the eql-pathom-overview from org to adoc and pushed to guides / tutorials: https://github.com/fulcro-community/guides/commit/4efdb1213098bc8416c4d32d1f3612b9d2d6bd7a 👍🙂

Jakub Holý 2021-03-02T20:12:58.153100Z

Awesome, thanks a lot!