Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

In addition to that to make robust pagination you need aggregation. Printing the message "you are looking at page X of Y pages" requires you to know the count of the collection or else you can't say how many pages there are. I.e You need to reactively monitor MongoDB's equivalent of "select count(*) from blaha". Doing that (without cheating and caching the count) is very expensive in Meteor.


How is caching the count "cheating"? Grabbing the count for every request would be ridiculously expensive in any framework, not just Meteor.


One count(*) query per request is not expensive at all. Suppose you cache the count and someone else adds rows to the collection. Your cached count is not getting updated and the whole reactivity concept breaks down since your app now thinks the row count is different from what it really is.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: