by

Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Repo info
Activity
  • 18:13
    cherifGsoul commented #5498
  • 18:12
    cherifGsoul edited #5498
  • Aug 02 04:19
    jasonbellis starred canjs/canjs
  • Jul 27 14:13
    phillipskevin commented #5499
  • Jul 27 14:12
    cherifGsoul edited #5498
  • Jul 27 13:52
    cherifGsoul labeled #5499
  • Jul 27 13:52
    cherifGsoul opened #5499
  • Jul 27 13:39
    cherifGsoul labeled #5498
  • Jul 27 13:39
    cherifGsoul labeled #5498
  • Jul 27 13:39
    cherifGsoul opened #5498
  • Jul 27 04:56
    MinChanSike starred canjs/canjs
  • Jul 24 03:35
    kanna99o starred canjs/canjs
  • Jul 23 16:49
    Nagwan96 starred canjs/canjs
  • Jul 22 21:20
    Telematica starred canjs/canjs
  • Jul 22 18:53
    cherifGsoul synchronize #5497
  • Jul 22 18:53

    cherifGsoul on remove-old-ecosystem-packages

    Trigger a build (compare)

  • Jul 22 04:52
    dirkarnez starred canjs/canjs
  • Jul 19 12:07
    rchougui starred canjs/canjs
  • Jul 17 17:42
    colonelpopcorn starred canjs/canjs
  • Jul 10 17:52
    lukewhyte removed as member
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
so you’re expecting the entire screen to change?
Christopher Oliphant
@RALifeCoach
I have added the timing code to find out why those two steps were taking so long
I can’t do anything to reduce the initial load
That’s why I am now focusing on the reload