Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Repo info
Activity
  • Mar 26 22:02
    greenkeeper[bot] commented #5469
  • Mar 26 22:02

    greenkeeper[bot] on @octokit

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

  • Mar 25 21:18
    sdillen starred canjs/canjs
  • Mar 25 20:34
    Aliens-dev starred canjs/canjs
  • Mar 25 19:43
    greenkeeper[bot] commented #5469
  • Mar 25 19:43

    greenkeeper[bot] on @octokit

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

  • Mar 25 08:06
    leepeterson starred canjs/canjs
  • Mar 24 21:23
    greenkeeper[bot] commented #5469
  • Mar 24 21:23

    greenkeeper[bot] on @octokit

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

  • Mar 24 07:00

    greenkeeper[bot] on webpack-4.42.1

    (compare)

  • Mar 24 06:58

    greenkeeper[bot] on webpack-4.42.1

    chore(package): update webpack … (compare)

  • Mar 21 01:00
    greenkeeper[bot] commented #5469
  • Mar 21 01:00

    greenkeeper[bot] on @octokit

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

  • Mar 20 06:52
    christianfelicite starred canjs/canjs
  • Mar 18 10:30
    dinko starred canjs/canjs
  • Mar 17 19:33

    cherifGsoul on master

    Update dist for release (compare)

  • Mar 17 19:33

    cherifGsoul on v6.4.0

    Update dist for release 6.4.0 (compare)

  • Mar 17 19:07

    phillipskevin on prep-can-632

    (compare)

  • Mar 17 19:07

    greenkeeper[bot] on can-view-live-5.0.2

    (compare)

  • Mar 17 19:07
    greenkeeper[bot] closed #5477
Kevin Phillips
@phillipskevin
about LazyMap I mean
Christopher Oliphant
@RALifeCoach
canjs/can-map-lazy#1
Kevin Phillips
@phillipskevin
thanks
Christopher Oliphant
@RALifeCoach
Do you have any new suggestions? Can you schedule a fix to lazy map?
Kevin Phillips
@phillipskevin
if it’s not a DOM update that is causing the problem (which you ruled out using paint flashes) I don’t have any new suggestions right now
Christopher Oliphant
@RALifeCoach
and lazy map?
Kevin Phillips
@phillipskevin
I can take a look at LazyMap
but I can’t promise anything
Christopher Oliphant
@RALifeCoach
it is simple to re-create
Kevin Phillips
@phillipskevin
ok, if you can track down the exception, PRs are always welcome
Christopher Oliphant
@RALifeCoach
I found the exception, but I just don’t know the code well enough to to create a PR
define('can/map/lazy/lazy', [
    'can/util/util',
    'can/map/lazy/bubble',
    'can/map/map_helpers',
    'can/map/map',
    'can/list/list',
    'can/map/lazy/nested_reference'
], function (can, bubble, mapHelpers) {
    can.LazyMap = can.Map.extend({ _bubble: bubble }, {
        setup: function (obj) {
            this.constructor.Map = this.constructor;
            this.constructor.List = can.LazyList;
            this._data = can.extend(can.extend(true, {}, this._setupDefaults() || {}), obj);
            can.cid(this, '.lazyMap');
            this._setupComputedProperties();
            var teardownMapping = obj && mapHelpers.addToMap(obj, this);
            this._nestedReference = new can.NestedReference(this._data);
            if (teardownMapping) {
                teardownMapping();
            }
            can.each(this._data, can.proxy(function (value, prop) {
                this.___set(prop, value);
            }, this));
            this.bind('change', can.proxy(this._changes, this));
        },
        _changes: function (ev, attr, how, newVal, oldVal) {
        },
        _addChild: function (path, newChild, setNewChild) {
            var self = this;
            this._nestedReference.removeChildren(path, function (oldChild, oldChildPath) {
                bubble.remove(self, oldChild);
                if (newChild) {
                    var newChildPath = oldChildPath.replace(path + '.', '');
                    if (path === newChildPath) {
                        oldChild._nestedReference.each(function (obj, path) {
                            newChild._nestedReference.make(path());
                            if (self._bindings) {
                                bubble.add(this, newChild, path());
                            }
                        });
                    } else {
                        var reference = newChild._nestedReference.make(newChildPath);
                        if (self._bindings) {
                            bubble.add(oldChild, newChild, reference());
                        }
                    }
                }
            });
            if (setNewChild) {
                setNewChild();
            }
the line throwing the exception is oldChild._nestedReference.each(_nestedReference is null
oldChild is not a type Constructor, but an Object
Kevin Phillips
@phillipskevin
ok
Christopher Oliphant
@RALifeCoach
@phillipskevin do you have an estimate as to when you can have a look?
Kevin Phillips
@phillipskevin
I am traveling at a client this week so not really.
I’m going to look at the issue today, but don’t have any idea if I’ll know how to fix it.
Julian
@pYr0x
@RALifeCoach can you reproduce this issue with lazymap on a simple and short example
Christopher Oliphant
@RALifeCoach
I knew someone was going to ask that. Yes I can.
Julian
@pYr0x
;) we have to make tests for CI
so a test that reproduce this problem is the first step to fix this
btw. can-map-lazy is currently for canjs 3.0
not for 2.x
Kevin Phillips
@phillipskevin
thanks, I was trying to figure that out
Christopher Oliphant
@RALifeCoach
I know it’s scheduled for 3.0, but gave me the best performance improvement so far
Kevin Phillips
@phillipskevin
require(‘can/map/lazy'); without installing can-map-lazy
there is a can.LazyMap plugin for 2.x also
right @pYr0x ?
Julian
@pYr0x
lazymap is currently (in canjs 2.x) integrated.
if i understand right, you have problems with nested properties?
Kevin Phillips
@phillipskevin
Christopher Oliphant
@RALifeCoach
yes - nested properties are causing the problem
Julian
@pYr0x
@phillipskevin yep, lazymap extends can.map
@RALifeCoach this stache isnt very short
and the test also
Christopher Oliphant
@RALifeCoach
Sorry - I can pare it down
Julian
@pYr0x
why?
this code isnt a testable code...
Christopher Oliphant
@RALifeCoach
it is much shorter now
Julian
@pYr0x
so we need the component?
can you remove that
Christopher Oliphant
@RALifeCoach
Better?
Julian
@pYr0x
didnt see any changes?
still a component
Christopher Oliphant
@RALifeCoach
yes there is still a component