Monday, 15 August 2011

performance - Meteor users and backbone very slow -



performance - Meteor users and backbone very slow -

i created project easy content sharing. can @ project here: sharingproject

you can utilize user@example.com 123456 password test site verified user. of course of study site has bugs yet...

i used meteor user bundle , backbone bundle navigate through pages. on localhost, there no problem. testing uploaded project meteor server. while logged in , navigating through pages, every time navigate new page app 'checks' user on client side because of url change. annoying...

of course of study navigate through pages calling session.set('page_id', ..) goal able send people url specific page on server.

the code similar 1 in todos illustration meteor page:

meteor.subscribe('pages', function () { if (!session.get('page_id')) { var page = pages.findone({}, {sort: {owner: -1}}); if (page) router.setpage(page._id); } }); ... var pagesrouter = backbone.router.extend({ routes: { ":page_id": "main" }, main: function (page_id) { session.set("page_id", page_id); }, setpage: function (page_id) { this.navigate(page_id, true); } }); router = new pagesrouter; meteor.startup(function () { backbone.history.start({pushstate: true}); });

why asking here: searched web , can't find same problem. either nobody tried before or there simple solution this?

edit: how phone call pages

<template name="pages"> {{#each pages}} <p><a href="/{{_id}}">{{title}}</a> {{#if isauthor}} <a class="delpage" href="javascript:delpage('{{_id}}')">delete</a> {{/if}} </p> {{/each}} </template>

i don't know how rendering page links link :

http://pagesharingproject.meteor.com/a1fbacba-0ddf-4077-a653-294b428bbfb8

should read like:

http://pagesharingproject.meteor.com/#a1fbacba-0ddf-4077-a653-294b428bbfb8

performance backbone.js meteor

No comments:

Post a Comment