Should ensureIndex be called in application setup?

Is it appropriate to call ensureIndex whenever application changes, e.g. in app.configure?

Does it have any downsides besides slightly slower startup time compared to setting it only for new mongo instances?

When ensure index is called on an already existing index it will register as a no op. This means it should not slow down your App at all if called from app.configure.

I cannot see any other downsides due to the fact that the function will just run and not create the index if it is already there.

I typically call ensureIndex() from application init, wrapped in a check for an expected existing collection. If the collection already exists, assume the DB is already properly indexed and skip the ensureIndex() calls.

More here: Mongodb: when to call ensureIndex?