Fork me on GitHub
#om
<
2015-11-02
>
bbss13:11:09

[ 28.572s] [om.next] [object Object] query took 18.039999999993597 msecs
console.js:203 
Heh, that didn't take long. Nice to have the warning simple_smile

bbss13:11:43

Only seems to happen once in a while, though.

dnolen14:11:07

@bbss: right thus warning only - I suspect JITing and other things could easily make that intermittent.

dnolen14:11:59

16ms might also just be too low … will need more feedback about that

bbss14:11:29

Hmm, I have a high dpi setting on my retina display, webapps have a hard time getting 60fps mostly.

bbss14:11:54

But I am using datascript for my queries and I guess that might not be a "high performance" choice either.

dnolen14:11:02

right that’s another thing … 16ms may be unrealistic for typical DataScript queries … I’m just not that familiar with DataScript perf expectations

dnolen14:11:23

though in my mind any ClojureScript code that takes that long that’s involved in UI can’t be a good thing

dnolen14:11:38

but not all apps need such discipline around perf

bbss14:11:47

60fps is something I care about though, having a low fps or unstable fps is something that annoys me. I know it's not consciously a big deal for most people but it still matters in how an app "feels".

dot_treo14:11:18

I think that having an (optional) warning for queries that take more than 16ms is very useful

dot_treo14:11:22

we as developers tend to have beefy machines anyway, so if it takes more then 16ms on our own machines, how long will it take on our mothers'?

bbss14:11:37

Yeah, plus I want my app to run well on mobile, those don't have resources to spare either.

dnolen14:11:47

I’m more concerned about mobile actually - where JS performance is anywhere from 5-10X slower

dnolen14:11:07

so something that takes 16ms on a desktop takes 160ms on a phone

monjohn14:11:35

I have a simple flashcard app that, after a correct response, increments the score of the Card, which has an ident, [:word/by-id id]. Works fine for the first card, but the second correct response evokes

Uncaught Error: Invalid key [:word/by-id 1], key must be ref or $next$protocols$IIndexer$key__GT_components$arity$2
So I am doing something wrong that is messing with the indexer, but I am not sure what.

dnolen14:11:52

@monjohn: could probably be better error for that, but that probably means there is no component mounted with that ident

dnolen14:11:39

@monjohn: you can use om.next/ref->any to check

dnolen14:11:47

(om.next/ref->any reconciler [:word/by-id 1])

monjohn14:11:12

@dnolen: That is indeed what was going on. When I advance cards to the next one in the list, the data for the next card shows on the screen, but the original card is still mounted. How do I go about changing which card is mounted, or mounting the next card?

dnolen14:11:45

@monjohn: that’s a React thing, you need to supply a different key

dnolen14:11:54

you probably have not specified :keyfn to your factory

monjohn14:11:10

Ah, got it. Thanks for the help!

dnolen14:11:10

np, still terrible error for that bug https://github.com/omcljs/om/issues/457

monjohn14:11:20

@dnolen: Yeah, something that pointed back to react would be good.

drcode15:11:40

Is closure "advanced compilation" still a TODO for Om Next, or is it worth entering issues related to this?

dnolen15:11:59

@drcode: advanced compilation should work in master if you’ve found a case where it doesn’t file an issue

drcode15:11:48

@dnolen: Thanks, will do

jannis17:11:13

Mmh, devcards are neat for testing different props and callbacks passed to Om Next components: http://jannis.github.io/om-next-kanban-demo/cards.html#!/cards.cards

adamfrey17:11:00

^that’s very cool

dnolen18:11:21

@jannis great! been wanting to make sure that Om Next has a good devcards story

jannis18:11:50

@dnolen: Those are completely ignoring the reconciler/parser aspect. That's because I want to test them in complete isolation. However, it shouldn't be too hard to add a reconciler to the local devcard state and perform transactions against that for testing.

dnolen18:11:12

@jannis: yeah I figured. Definitely want to ensure that it’s easy to mock out the reconciler as well

jannis18:11:11

I'll be sure to try that.

scriptor22:11:34

hi, in om.old, I have something like (om/build-all f [:foo :bar :baz] m)

scriptor22:11:09

how do I set a :key in m such that it uses :foo, :bar, etc. as the key?