alethes/meteor-pages — pull request #71 by fletchtj (2014-10-15 03:52:54+00:00)
Title: Modified iron-router route names. Updates for 0.9.4

I tweaked the code in setRouter to give unique route names. I also made some modifications to clean up the warnings after the 0.9.4 update. I had also fixed a pretty big bottleneck in paginating large sets of data, but realized after I was getting ready to contribute the fix...you had already taken care of it when you added live sort functionality. I've been using my own fork, and hadn't thought to pull your latest.

Is there a specific reason that you are adding and using the _#{@id}_i field on the doc? I see where you are using it to sort the paginated collection on line 457, but why not use the @sort instead? I would think you could get by without the "addedAt" and "movedBefore" observers. When I was doing some initial tests, I didn't see the movedBefore fire...only "added", "changed", and "removed". Mostly saw the "added" and "removed" when the docs would jump from page to page, so I found as long as I updated the _#{@id}_p field and used the sort criteria...everything worked out. Maybe I'm missing something, though?