by

Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Repo info
Activity
  • Aug 08 12:57
    trimentor starred canjs/canjs
  • Aug 07 19:43

    cherifGsoul on 5.x-legacy

    Can5 YouTube terms of service (… (compare)

  • Aug 07 19:43
    cherifGsoul closed #5503
  • Aug 07 19:39

    cherifGsoul on can4-youtube-terms-services

    Can4 YouTube terms of service (compare)

  • Aug 07 19:34
    cherifGsoul opened #5503
  • Aug 07 19:33

    cherifGsoul on add-youtube-policy-notice-for-v5

    Can5 YouTube terms of service (compare)

  • Aug 07 18:37

    cherifGsoul on add-youtube-terms-of-service

    (compare)

  • Aug 07 18:37

    cherifGsoul on master

    Add youtube and google terms of… (compare)

  • Aug 07 18:37
    cherifGsoul closed #5502
  • Aug 07 18:28
    cherifGsoul review_requested #5502
  • Aug 07 18:28
    cherifGsoul opened #5502
  • Aug 07 18:28

    cherifGsoul on add-youtube-terms-of-service

    Add youtube and google terms of… (compare)

  • Aug 05 19:54

    cherifGsoul on master

    Update dist for release (compare)

  • Aug 05 19:54

    cherifGsoul on v6.6.0

    Update dist for release 6.6.0 (compare)

  • Aug 05 19:40

    cherifGsoul on update-can-type-115

    (compare)

  • Aug 05 19:40

    cherifGsoul on master

    Update can-type to 1.1.5 (#5501) (compare)

  • Aug 05 19:40
    cherifGsoul closed #5501
  • Aug 05 19:14
    cherifGsoul opened #5501
  • Aug 05 19:13

    cherifGsoul on update-can-type-115

    Update can-type to 1.1.5 (compare)

  • Aug 05 19:10

    cherifGsoul on update-youtube-logo

    (compare)

Thomas Sieverding
@Bajix
1) Pass around map instances instead of cross-binding properties to components
2) Use one-way binding whenever applicable
3) Use leakScope: false whenever applicable
4) Use ./ within your bindings
Thomas Sieverding
@Bajix
5) Use computes like a mad man. The goal is to lower unnecessary change events. For example, the isAdmin getter I described above is actually really performant, as now I can bind to it elsewhere, and something like changing users or logging in that would trigger isAdmin to be re-computed wouldn’t trigger other computes that are dependent on isAdmin from re-computing if isAdmin doesn’t change
isAdmin: {
  get: function() {
    var profile = this.attr('profile');

    if (profile) {
      return profile.attr('tier') === config.tiers.indexOf('admin');
    }

    return false
  }
}
Changing profile / tier would recompute this. But if the value hasn't changed, computes dependent on this wouldn't recompute
Julian
@pYr0x
@Bajix you mean, that computes are cached...?
how look like the worse isAdmin method?
Christopher Oliphant
@RALifeCoach
@pYr0x parseModel isn’t producing any better results than simply using type: ‘*’ for objects not needing observables
Julian
@pYr0x
ok.. and what about the point 5) bajix said?
also 3) and 4) are good points
to look at
Christopher Oliphant
@RALifeCoach
computes give a way to handle events outside of the component when attributes within the map associated with the component change
I don’t really have a need for that
When I turned on leakScope - everything stopped working
All my data is in the viewModel, not in the outer scope
I haven’t tried ./ and I must confess I am not sure what that means
I don’t recall seeing that in the docs
Christopher Oliphant
@RALifeCoach
@pYr0x can you please point to the docs for ./
Jeroen Cornelissen
@jeroencornelissen
Christopher Oliphant
@RALifeCoach
Thanks
Kevin Phillips
@phillipskevin
@RALifeCoach one thing I would test is how much of the DOM is being updated when you make a change
Christopher Oliphant
@RALifeCoach
sure
Kevin Phillips
@phillipskevin
you can turn on paint rectangles in chrome dev tools
Christopher Oliphant
@RALifeCoach
how do you want to do that?
then when you change something, the piece of the DOM that was updated should flash green
Christopher Oliphant
@RALifeCoach
I am not seeing any of it flash green during load or reload
Kevin Phillips
@phillipskevin
ok, when you say “updating is taking a while” what do you mean exactly?
Christopher Oliphant
@RALifeCoach
var stache1 = new Date().getTime();
                this.playerRowMap.attr({'player': request.player});
var stache2 = new Date().getTime();
pgatour.stacheTime += stache2 - stache1;
at the end of 156 updates the total accumulated time is 1.8 seconds
Kevin Phillips
@phillipskevin
but that’s not noticeable by the user?
Christopher Oliphant
@RALifeCoach
I notice it
Kevin Phillips
@phillipskevin
how?
Christopher Oliphant
@RALifeCoach
and I am on a high end MAC Pro
I haven’t tried it on my phone yet
I can see the delay
2 seconds is a noticeable delay
Kevin Phillips
@phillipskevin
so… you click a button and expect new data to be shown, but it takes time
Christopher Oliphant
@RALifeCoach
that’s right
Kevin Phillips
@phillipskevin
but during that time, the browser isn’t locked… you can scroll, or click other things
Christopher Oliphant
@RALifeCoach
and it is a conversion of existing code that uses jQuery tmpl - that time to reload was .4 seconds
and if I write code to strip down my player object from hundreds of properties to the 30 or so I need, I get close to the .4 second reload time
Kevin Phillips
@phillipskevin
ok, yeah, I’ve been reading some of the earlier conversation
Christopher Oliphant
@RALifeCoach
I have used type: ‘*’ and parseModel - both gave the same improvement - down from 6 seconds to reload
Kevin Phillips
@phillipskevin
so I’m still a little confused
when you notice the delay, what are you expecting to change?
Christopher Oliphant
@RALifeCoach
nothing
Kevin Phillips
@phillipskevin
so… you click a button and expect new data to be shown, but it takes time
Christopher Oliphant
@RALifeCoach
It is actually a very long and complicated page load - the data is loaded once and then reloaded with more details
Kevin Phillips
@phillipskevin
ok