Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Repo info
Activity
  • Dec 08 21:21
    greenkeeper[bot] commented #5392
  • Dec 08 21:21

    greenkeeper[bot] on core-js-3.4.8

    chore(package): update core-js … (compare)

  • Dec 06 18:40
    cherifGsoul review_requested #5441
  • Dec 06 18:39
    cherifGsoul opened #5441
  • Dec 06 18:22

    cherifGsoul on update-infrastructure-page

    Update infrastructure page with… (compare)

  • Dec 06 18:14
    greenkeeper[bot] commented #5422
  • Dec 06 18:14

    greenkeeper[bot] on @feathersjs

    chore(package): update @feather… (compare)

  • Dec 06 18:11
    greenkeeper[bot] commented #5401
  • Dec 06 18:11

    greenkeeper[bot] on @feathersjs

    chore(package): update @feather… (compare)

  • Dec 04 22:03
    chasenlehara opened #5440
  • Dec 04 22:03
    chasenlehara labeled #5440
  • Dec 04 19:18
    cherifGsoul review_requested #5432
  • Dec 04 14:09
    m-ahmadi starred canjs/canjs
  • Dec 04 10:52
    ansyeow starred canjs/canjs
  • Dec 03 14:53
    matthewp commented #5439
  • Dec 03 14:30
    frank-dspeed opened #5439
  • Dec 02 18:13
    greenkeeper[bot] commented #5392
  • Dec 02 18:13

    greenkeeper[bot] on core-js-3.4.7

    chore(package): update core-js … (compare)

  • Dec 02 17:48
    greenkeeper[bot] commented #5392
  • Dec 02 17:48

    greenkeeper[bot] on core-js-3.4.6

    chore(package): update core-js … (compare)

Christopher Oliphant
@RALifeCoach
@cherifGsoul okay, that’s what I thought. What I have done is trigger an event from within the component and listen for the event in the owning module. That works.
Mohamed Cherif Bouchelaghem
@cherifGsoul
@RALifeCoach
   can.Component.extend({
tag: ‘my-component’,
template: can.view(‘#some-template’),
viewModel: {
    define: {
        xxx: { type: ‘string’ }
    }
},
events: {
"{viewModel} xxx":function(){
}
}
});
Justin Meyer
@justinbmeyer
@RALifeCoach was unable to read all of what you wrote ... but I want to address one thing you said .... CanJS, and most frameworks, make your life easier, but that always comes at some performance cost
C makes your life easier than assembly, but at some cost
JavaScript makes your life easier than C, but at some cost
CanJS makes your life easier than plain JS, but at some cost
Why does CanJS's observables covert the entire object into an observable? Because when MOST properties are used (which is the case for MOST apps), its faster to do all of them right away instead of progressively convert them like LazyMap
Christopher Oliphant
@RALifeCoach
@justinbmeyer I am willing to accept some performance hit when initially creating the page. I was surprised when updating the page took even longer. My expectation was that Can JS would be quick and efficient especially when no DOM updates were required.
Justin Meyer
@justinbmeyer
CanJS's observables are "quick" but not quick compared to plain JS objects
they have been worked on a lot to make performance as fast as possible
btw, if you have objects that you don't need observable, you can define their type like "type": "*"
with the define plugin
those objects will not be converted to Maps / Lists
Christopher Oliphant
@RALifeCoach
When I strip down the big object to be an object that contains only needed properties, there is slight improvement on initial load and a huge improvement on update.
I did make use of type: ‘*’ - that gave some improvement
Justin Meyer
@justinbmeyer
the improvement on update doesn't make sense
I wonder if this is what @Bajix was talking about
are you listening to "change" events?
the number of props shouldn't matter to update
ah ... if you are listening to "change" events ... then @Bajix is also right that additional slowness will be introduced
in the initial render
b/c bubbling will need to be setup
Christopher Oliphant
@RALifeCoach
I don’t have a need to fire events on data changing. The only events would be internal to the UI. (Updating the DOM when a value changed.)
Justin Meyer
@justinbmeyer
not sure what that means ... does that mean no, you are not binding on "change" events?
Christopher Oliphant
@RALifeCoach
no I am not binding change events
Dovid Bleier
@dbleier
@cherifGsoul here is the jsbin http://jsbin.com/hemuliyugu/1/edit?js,console
the 1st time you run will set up the cache
then try making a change to the data in the fixture
you'll notice it console.logs the cached data only
if you run a 3rd time you'll see the updates
Mohamed Cherif Bouchelaghem
@cherifGsoul
ok Im checking
Justin Meyer
@justinbmeyer
@RALifeCoach if you'd like to check if bubbling is getting setup, you can put a debugger here: https://github.com/canjs/canjs/blob/master/map/bubble.js#L42
if that gets hit, something is setting up bubbling
Dovid Bleier
@dbleier
the goal is to get logHellos to fire again after cache is updated
Christopher Oliphant
@RALifeCoach
@justinbmeyer in many ways my code is quite simple. All data is display only. There is some binding against controls, but not against the data itself.
Dovid Bleier
@dbleier
I have to run to a wedding, so I probably won't check back until tomorrow. thanks for the help
Justin Meyer
@justinbmeyer
@RALifeCoach if that's the case, I wouldn't convert it to a Map at all
Christopher Oliphant
@RALifeCoach
Once everything is loaded, the page is quite quick.
the problem is that on initial display the controls are loaded and then updated on all 156 rows
Dovid Bleier
@dbleier
@justinbmeyer what would you use if not a Map? I thought maps were the heart of canjs. My app is also read only and changes are only based on what is received from the server
Christopher Oliphant
@RALifeCoach
Are you suggesting that I pass all data as attributes to the component? There are a lot of attributes!
@justinbmeyer are you still here?
Christopher Oliphant
@RALifeCoach
This is the annoying part - someone makes a statement, I ask for clarification and … silence. This doesn’t happen all the time, but enough that it is annoying.
Mohamed Cherif Bouchelaghem
@cherifGsoul
@RALifeCoach we try to help you everyday
Christopher Oliphant
@RALifeCoach
And you guys have been great - I do not say that often enough. I praise you guys to the folks at work. The level of response to questions from original developers is truly amazing.
Mohamed Cherif Bouchelaghem
@cherifGsoul
We are at our work offices and we took time to help you
Thank you :)
Christopher Oliphant
@RALifeCoach
It’s just the statement, question, silence that’s trying. If you are busy, fine, just let me know.
Mohamed Cherif Bouchelaghem
@cherifGsoul
yes silence means busy
:)