leaguevine / leaguevine-ultistats

MIT License
18 stars 4 forks source link

Roster screen is way too slow #84

Closed cboulay closed 12 years ago

cboulay commented 12 years ago

Prohibitively slow. I'm thinking of redoing the rosters entirely to make them faster. Right now the speed is unacceptable. Maybe I can get away with using a single collection of teamplayers per team and having another dictionary with keys = player ids and values = onfield status. It should be relatively quick to change integer status, instead of moving models around. I should also make rendering manual (e.g. pressing "action screen" button) instead of binding to the teamplayers collection.

mliu7 commented 12 years ago

Hmm, on the faster_roster branch, the entire team substitution page is blank for me except for the "next roster" button in the upper right. It's not throwing any javascript errors, but there are just no player buttons showing up.

I haven't yet looked into what is causing this, but I'll re-open this issue for now until I can locate the problem and fix it on my machine.

cboulay commented 12 years ago

What browser are you using? Are you sure the team has players?

cboulay commented 12 years ago

I tested it only in Chrome (Firefox will never work because of WebSQL), but I tested it on a windows computer, on my macbook air, and on my galaxy nexus.

cboulay commented 12 years ago

Also, try testing in an incognito window to make sure your cache isn't interfering. (Sorry for the comment spam).

mliu7 commented 12 years ago

I'm also using chrome, and it doesn't work in either my regular chrome window or incogneto. I've deleted my cache as well, and I am sure that I'm looking at games that have teams with players on them. Everything runs fine when I switch back to the master branch.

The one difference in our configurations is that I'm serving these files up statically through our django app. We have this working well with pushstate and the rest of the app still works fine, it's just the gametracking pages. Can you think of any special apache configuration issues I am missing while serving these pages up statically?

mliu7 commented 12 years ago

The problem was due to some issues with upgrading from master to the faster_roster branch. Using the packaged distribution fixed these issues, so on Leaguevine we are just hosting the packaged distribution instead of lots of individual files. I'm marking this as closed.

mliu7 commented 12 years ago

Sorry, but I'm going to have to re-open this bug. The new roster page works great, except that when you actually use the app for a few minutes it becomes unusably slow again. Try adding and removing a bunch of players, then going to the action page to enter a bunch of actions, and then adding/removing more players. On my iPhone 3GS the initial time to add/remove a player is very quick with almost no delay at all, but after clicking about 40 buttons, like I mentioned before, this time slowed to about 4 seconds per substitution.

mliu7 commented 12 years ago

Your last commit fixed it, thanks. I'm closing this again.