This is the Meteor Todos example forked from https://github.com/meteor/todos. The
application has been changed to be less performant. Run Performance.checker()
in the
Meteor shell to test problem solutions.
meteor npm install
meteor
then visit localhost:3000
Be sure to wait until the fixtures have finished loading before attempting to work on each problem.
The main files you will be working with are in /imports/api
. There is a folder for each collection (todos and lists) containing Meteor methods (methods.js) and schema definitions (todos.js/lists.js). In the server
folder for each collection you can find publications.js
containing collection publications.
Marking All Todos Complete (checkbox in the top right) is pretty slow. Use the qualialabs:profile package to take a server-side profile and determine what is causing the slowness. The profiler can be found already installed in the meteor shell at Performance.Profiler
.
The application contains a polling observe. Use the qualialabs:analyze-observes package found in the Meteor shell at Performance.Analyze
to identify the polling observe and remove it.
A large unused field is being published to the client. Use the Meteor DevTools chrome extension to identify what is being published and omit it from the list of published fields.
The application contains no indices on the Todos collection, and queries on Todos require a full collection scan. Add an index on the Todos collection to avoid paging the entire collection into memory when running queries.
Performance.checker()
: Runs a test suite for each problem.
Performance.Analyze
: the qualialabs:analyze-observes package
Performance.Profiler
: the qualialabs:profile package