Can anyone help debug performance issues in my app

I’m very very new to meteor and my first app I created is quite popular, a free website called riustats.com.

The performance of the app however is terrible for the amount of data it is returning, I’ve looked at ddp analyzer and tweaks the subscriptions. I use kadira.io and generally don’t see anything terrible to my eyes, but have no good idea on how to debug things further.

It also randomly does things I have no idea on how to resolve; like the routes waitOn sometimes never resolves with Router.current().ready() returning false forever. The only way I’ve managed to fix this is restart the whole app.

This is a free website that I am doing purely for fun and getting no monetary rewards for but if someone is willing to help out by taking a look at my codebase and giving some guidance of areas to look at I’d really, really appreciate it.

Are you creating custom publications?
If so, some of your publications does not send the ready signal(this ready()) correctly.

It’s very hard for someone to help to debug you code without seeing it.
May be you can open source the app and we can see how it’s and help you.

Hi thanks for your reply, it’s on github and I can add you if you’re willing to take a look.

So I have publications like:

Meteor.publish 'episode', (season, episode) ->
    Episodes.find({season: season, episode: episode})

Do I need to call this.ready() after doing the find then?

If you are returning cursors, you don’t need to do that.

Thanks I did some reading on calling ready and realised I didn’t need it when using cursors, can I add you to the project on github for further feedback?

Currently replacing Iron Router with Flow Router and Flow Layout and that’s made my app as speedy as I expect, only having minor niggle with Flow Router.