Note that there are some explanatory texts on larger screens.

plurals
  1. POmeteor collection fetching too slow
    primarykey
    data
    text
    <p>I have an app that subscribes to 4 collections (the collections are very small 1 to 20 records each). But the amount of time it takes to load these collections is huge. One of them is just 13 records, and it takes several seconds to load its template. Is it normal? (I'm still testing on meteor servers)</p> <p>this is a sample of the code : </p> <pre class="lang-js prettyprint-override"><code>Meteor.subscribe('trackedUser', function() { console.log('finished fetching trackedUser'); Template.users.rendered = function() { /*handlign of the template*/ console.log('users template rendered'); } }); /*observe geolocation after it is all fetched*/ Meteor.subscribe('geolocation', function() { console.log('finished fetching location'); /* Obseve the Collection geolocation and trigger event when item inserted or removed */ query = Geolocation.find({}); query.observeChanges({ added: function(id) { addMarkerToMap(id); window.map.fitBounds(group.getBounds()); return; } }); }); }); </code></pre> <p>And this is my template </p> <pre class="lang-html prettyprint-override"><code>&lt;template name="users"&gt; &lt;ul id="item-list"&gt; {{#each trackedUser}} &lt;li id="{{_id}}"&gt; &lt;input type="checkbox" checked /&gt; &lt;span&gt;&lt;select name="colorpicker"&gt; {{#each color}} &lt;option value="{{mColorCode}}" {{selected ../mColor mColorCode}}&gt;{{mColorName}}&lt;/option&gt; {{/each}} &lt;/select&gt; &lt;/span&gt; &lt;img width="40" src="data:image/png;base64,{{mImage}}" /&gt; &lt;span class="name"&gt;{{mUsername}}&lt;/span&gt; &lt;p&gt;&lt;span class="description"&gt;{{mDescription}}&lt;/span&gt;&lt;/p&gt; &lt;/li&gt; {{/each}} &lt;/ul&gt; &lt;/template&gt; </code></pre> <p>Thanks</p>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload