These are chat archives for canjs/canjs

14th
Apr 2016
Christopher Oliphant
@RALifeCoach
Apr 14 2016 12:07
@pYr0x What is your question?
Julian
@pYr0x
Apr 14 2016 12:11
the question was, what is your question ? ;)
I am back talking about performance. I ran the same 156 rows in IE on windows 10. The load time was 27 seconds.
Christopher Oliphant
@RALifeCoach
Apr 14 2016 12:11
How do I get the 27 seconds down to 9 seconds?
Julian
@pYr0x
Apr 14 2016 12:11
:D
why is the load time different to firefox?
or on which platform to you get 9 sec
Christopher Oliphant
@RALifeCoach
Apr 14 2016 12:12
I have it down to 23 seconds by moving logic from my stache map into code
Kevin Phillips
@phillipskevin
Apr 14 2016 12:13
grid performance has been suggested for an upcoming training topic in https://gitter.im/bitovi/js-training
Christopher Oliphant
@RALifeCoach
Apr 14 2016 12:13
On Chrome on my MAC the same data loads in 4 seconds
Kevin Phillips
@phillipskevin
Apr 14 2016 12:14
@RALifeCoach maybe you can be a part of that or provide some information on the specifics of your app so it can address your issues
Julian
@pYr0x
Apr 14 2016 12:14
so the diffrence is between mac (chrom) and windows (ff)
Kevin Phillips
@phillipskevin
Apr 14 2016 12:14
does ie have a profiler?
Christopher Oliphant
@RALifeCoach
Apr 14 2016 12:15
windows ie 11
Julian
@pYr0x
Apr 14 2016 12:15
and you have the same app logic?
in both
Christopher Oliphant
@RALifeCoach
Apr 14 2016 12:16
yes - in both cases they are running the identical code - in fact my PC is pulling the identical files directly from my MAC
I don’t know if IE has a profiler
Julian
@pYr0x
Apr 14 2016 12:18
so the problem is not canjs?
it is a problem of IE javscript engine?
Kevin Phillips
@phillipskevin
Apr 14 2016 12:19
could be anything
Christopher Oliphant
@RALifeCoach
Apr 14 2016 12:21
IE is still a major browser, canjs needs to be responsive on IE as well as Chrome
I am looking at the IE profiler
Julian
@pYr0x
Apr 14 2016 12:23
we have no influence on the javascript engine that runs in the browser
Kevin Phillips
@phillipskevin
Apr 14 2016 12:23
there might still be ways to improve the performance
@RALifeCoach I would look into the profiler in ie
Christopher Oliphant
@RALifeCoach
Apr 14 2016 12:25
the major users of cpu are ‘hydrate’ and appending the stache fragment to the DOM
Kevin Phillips
@phillipskevin
Apr 14 2016 12:25
to get some more information
Christopher Oliphant
@RALifeCoach
Apr 14 2016 12:27
of the 24 seconds spent building the form 15 are in hydrate and 9 in append
of hydrate’s 15 seconds, most are in renderer
Kevin Phillips
@phillipskevin
Apr 14 2016 12:29
have you submitted this on the forums? http://forums.donejs.com/c/canjs
Christopher Oliphant
@RALifeCoach
Apr 14 2016 12:29
I have raised this performance issue before. This has been a long standing concern of mine.
under renderer 14 seconds are being used by hydrateCallbacks
do I keep going?
Kevin Phillips
@phillipskevin
Apr 14 2016 12:31
I ask about the forums because I don’t know enough about the stache internals to help you
I think these details would be helpful for Justin, David, or someone else who knows the code better
Christopher Oliphant
@RALifeCoach
Apr 14 2016 12:32
Okay - I will post these numbers in my existing performance issue
Dovid Bleier
@dbleier
Apr 14 2016 12:47
Using superModel with fall-through-cache, I call getList() which returns a list of truncated data and caches. good.
next, when the user chooses an item from the list it calls get() to retrieve all the data for that item, and caches, good.
since the list item and the actual data share the same id, when the item is retrieved, it overwrites the spot in the cache where the list item is, which is fine since it's a super-set of the list data, good.
the problem arises when the page is refreshed and getList() is called again, it overwrites the data in the cache. Since this is a sub-set of the data, most data in the cache is gone until the next call of get() which is bad.
so the advantage of caching is lost.
I would think this is a fairly common use case. So either I am doing something wrong in my modeling or...
Kevin Phillips
@phillipskevin
Apr 14 2016 13:09
@dbleier you should probably submit an issue
Dovid Bleier
@dbleier
Apr 14 2016 13:10
ok
Paul Tichonczuk
@tracer99
Apr 14 2016 17:52
I remember hearing here, ore on IRC that there was a script to convert mustache to stache templates kicking around?
Google has failed me
WooFerPPK
@WooFerPPK
Apr 14 2016 18:35

Hey I'm having some trouble adding a component to a canjs 2.3 application I work on. I'm trying to use <can-import> in canjs to import a component I made.

The component .js file I made seems to execute when I do the <can-import from="foo/bar">, however the .stache template file that I specify in the component does not seem to load within the template the can-import is in.

I tried to load it by adding the tag name <tag-foobar></tag-foobar>. However that does not seem to work.

Here is a basic run down of my component file. I first import my .stach template file that I want to use by doing: "import template from 'foo/bar/'" I then try to add the template to the component like this:
Component.extend({ ... }, template);
I do not get any JavaScript errors right now. Any ideas on what could be wrong?

Kevin Phillips
@phillipskevin
Apr 14 2016 19:06
you probably need to give the extension
import template from 'foo/bar/' will load foo/bar/bar.js
so you probably want import template from ‘foo/bar/bar.stache’