Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Repo info
Activity
  • 07:57
    rjgotten commented #5511
  • Jan 14 19:48
    cherifGsoul commented #5511
  • Dec 30 2020 17:45
    cherifGsoul assigned #5513
  • Dec 29 2020 15:54

    cherifGsoul on upgrade-docs-html-canjs

    (compare)

  • Dec 29 2020 15:48

    cherifGsoul on master

    Upgrade the site theme for new … (compare)

  • Dec 29 2020 15:48
    cherifGsoul closed #5514
  • Dec 29 2020 13:26
    hameema starred canjs/canjs
  • Dec 28 2020 19:16
    cherifGsoul opened #5514
  • Dec 28 2020 19:11

    cherifGsoul on upgrade-docs-html-canjs

    Upgrade the site theme for new … (compare)

  • Dec 14 2020 06:24
    bozaigao starred canjs/canjs
  • Dec 11 2020 16:25
    cherifGsoul reopened #5495
  • Dec 10 2020 20:45
    cherifyazid starred canjs/canjs
  • Dec 10 2020 20:34
    chaouanabil starred canjs/canjs
  • Dec 10 2020 20:31
    cherifGsoul closed #5508
  • Dec 10 2020 20:31
    cherifGsoul commented #5508
  • Dec 10 2020 19:42
    cherifGsoul closed #5491
  • Dec 10 2020 19:42
    cherifGsoul commented #5491
  • Dec 06 2020 23:30
  • Nov 29 2020 14:58
    ycjcl868 starred canjs/canjs
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
Kevin Phillips
@phillipskevin
sure
Christopher Oliphant
@RALifeCoach
Justin suggested lazy map and I was seeing timings where I wanted them to be
But lazy map is broken with more complex data
I was really hoping someone would fix lazy map
Kevin Phillips
@phillipskevin
is there an open issue?
Christopher Oliphant
@RALifeCoach
yes
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