This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2016-03-17
Channels
- # admin-announcements (4)
- # beginners (35)
- # boot (183)
- # cider (28)
- # cljs-dev (4)
- # cljsjs (1)
- # cljsrn (5)
- # clojure (52)
- # clojure-austin (4)
- # clojure-russia (83)
- # clojure-sdn (1)
- # clojure-uk (18)
- # clojurescript (48)
- # core-matrix (5)
- # cursive (4)
- # datomic (23)
- # devcards (2)
- # dirac (43)
- # editors (2)
- # emacs (4)
- # events (5)
- # funcool (2)
- # hoplon (81)
- # immutant (3)
- # juxt (3)
- # ldnclj (1)
- # luminus (12)
- # off-topic (6)
- # om (72)
- # onyx (32)
- # parinfer (2)
- # pedestal (1)
- # proton (6)
- # protorepl (3)
- # re-frame (30)
- # reagent (2)
- # spacemacs (2)
- # specter (1)
- # testing (1)
- # uncomplicate (3)
- # untangled (15)
- # yada (10)
Hey, I am thinking about using hoplon for the client side of a side project. Does anyone know where does hoplon stand in terms of speed compared to other alternatives? (reagent, om, react)
hoplon doesn't need one, because javelin doesn't propagate unnecessary changes at the data layer
so it just naturally performs the minimum number of dom manipulations, whithout any need for things like that
@flyboarder: thanks! will investigate
so, i turned my 2 pages (index and styleguide) into two defelem
then I did this
(u/outer-dom
(u/the-header)
(cell= (if is-index
(index/index)
(style-guide/style-guide))))
I’m getting some serious negative performance issues (looks like garbage collection maybe?)
but i see the issues even when is-index
is not changing (the URL fragment is not changing)
I think I don’t understand something >.<
speaking to what @micha said earlier: "hoplon doesn't need one, because javelin doesn't propagate unnecessary changes at the data layer"
I had thought that the cell=
would have zero performance impact as long as is-index
does not change
the problem is probably me 😉
ok, i think the problem was actually my crazy pseudo-route-cell
nope, swapped to route cell
still seeing it 😞
@dm3: that’s a nice tip for handling display
i’m still not quite sure why it’s needed though
i saw there is a PR up for an if-tpl
no idea if that helps
well i guess i’ll do a short writeup of my experiences on that PR then
hey, does hoplon have a way to handle delegation of events to elements outside a loop-tpl
?
a cell in scope for both elements is a way
you mean like, i click on something in the loop-tpl, and you want that to cause something to happen outside the loop-tpl?
i mean like, i have 100 elements created by the loop-tpl
and each one has 5 event handlers
in jquery i can just delegate one event handler to an ancestor
rather than have 500 event handlers
is 500 event handlers slow? or do you find delegating events cleaner
i’m in the habit of delegating
i don’t know what is slow though @alandipert
something was slow
and inconsistently too, which made me think of gc
well, when i profiled, it said it spent most of its time in jquery event adding
i should have ss
definitely good to find what's slow and work from there
for now i’m going to go with display:none;
but i’m going to keep an eye on if-tpl
and try again if/when that gets in
Hello @alandipert. I finally got the chance to test form validation with formula
, and couldn't make it work. Here is what I have :
I can't turn is-form-valid?
to true
any idea?
seems to have a problem with form-postal-valid?
problem solved. Made a typo somewhere else in my code
Thanks again for make-validator
!
@thedavidmeister: I would also recommend sticking with :toggle
for now, i believe there is also a cond-tpl
in the works, which is probably more along the lines of cell based app views, im currently using a regex match over route-cell to handle nested views
@leontalbot: saw just ni time to also see you fixed :thumbsup:
the if-tpl
macro uses the same mechanism as you're currently using with :toggle
, except it removes things from the dom instead of hiding them
@thedavidmeister: you could use delegated handlers in loop-tpl, no?
@micha: should the snippet @thedavidmeister posted on https://clojurians.slack.com/archives/hoplon/p1458204887000228 work at all? Having a Cell of DOM elements passed as children to another element?
so you need to manage memory then, or make sure the thing in the cell is a pure function
the cell= method will remove the children from the dom, but it can't make sure they get garbage collected
hey guys how's this sound for a pattern for a hoplon app that uses sente to do a lot of WS communication. Basically I'm sending a of messages to the server, most of which are responded to asynchronously. I have a 3 cells that are just lists of events: incoming-messages on which all incoming messages are conj'd, outgoing-messages, which messages are conj'd onto, and then a formula cell actually sends them to the server, and then user-inputs, a list of all user-input events. Then all ui components take as arguments formula cells that are some subset of these event streams, ie it will filter the incoming messages to just what it needs to display, and also take the actual event stream cells they may need to add an event to.