The-James Hockey League

The-James Hockey League

Running on UHS - Ultimate Hockey Simulator
TJHL - Season 48 - Regular

UHS Build 10635 – Finally Time for Bed

January 6th, 2017 by Stone

UHS Build 10635 – January 5 2017
This is a hybrid maintenance / enhancement build. Initially I had begun creating the new Team Home and the Marketing / Bonus Revenue additions when I had noticed a relatively new league with an abysmally slow sim run time. One thing led to another and I suddenly found myself smack in the middle of some DB optimizations.

I had also uncovered the issue with page load times being centered around AutoGM teams appearing in the UHS instant messenger. Once that was fixed I kind of felt like I was on a roll and decided to go all in on the optimization issues I had been seeing.

This was certainly a lengthy release. As I write this I’ve been up for 24 hours straight. The build release itself has been going for nearly 12 hours, a lot longer than I thought it would go. Hopefully we won’t have to go through nights like this again. Time for bed.

Marketing / Bonus Revenue
We’ve added an option for pro teams to earn extra revenue. Initially this was supposed to be something where the team invested in something like Lawyers/Medical, however, it became apparent that eventually all teams would just wind up at the maximum level anyway. I decided to go in a different direction.

For each game your pro team plays there is a 5% chance (by default) that you will earn extra revenue. By default the extra revenue will be 10% – 100% of the normal revenue that would have been earned for that game. All settings are manageable by the COM. Setting the chance to 0% will disable the functionality.

All finance pages have been updated to show the extra Marketing revenue.

Team Home
The Team Home page has been slightly redesigned. The layout was intended for PC browsers as you’ll very likely see some overlapping on mobile browsers. The page will now feature the last 5 game results (instead of just the last game), next 5 upcoming games and the roster/line checker for the Pro and Farm team in their own sections.

Sim Engine & DB Optimizations
I spent most of the day looking at the SIM Engine performance and added a few indices to our tables to speed things up. Overall for very large leagues or ones that simmed quite a bit, the engine ran very slow, sometimes taking as long as 50 seconds to sim just a single game. That will change back to the more normal speed / average of between 1-3 seconds per game (sometimes a little more depending on server usage).

Additionally I added other indices to help prevent duplicate stat inserts. I’m not sure exactly why the duplicates are happening yet, however, adding a unique index for specific fields in each table will basically prevent the duplicates from getting inserted. When this build is released I plan on wiping all league’s aggregate Player and Goalie stats and rebuild them before UHS is brought back online to remove the duplicated stats.

Bug Fixes & Miscellaneous Changes
– Fixed an issue where errors were being logged in the database if a team did not have a coach assigned to a team. User would never see these errors.

Hot Fixes
– Fixed an issue where teams no longer owned coaches after the build deployment. Hotfix: Jan.1.2017.

– Fixed an issue where users were not able to reset their password. Hotfix: Jan.2.2017.
– AutoGMs will no longer appear in the UHS IM. This GREATLY improves the loadtimes for pages. Hotfix: Jan.3.2017.
– Released code to better handle Live vs. QA leagues. Hotfix: Jan.3.2017.

Public Site Template, Ultimate Hockey Simulator, uhs.HockeySim.ca © 2024 HockeySim.ca.