fixed site performance issue (Read 1906 times)

eric :)

    Hi everyone, If you have many entries in your training log, I'm sure you noticed that it takes a long while to load the summary page. I'm sure you also noticed that once in a while, it takes forever to load any page on RA. It turned out that both of these problems are related. In the case of the summary page, lots of computation is needed to generate weekly, monthly, and yearly numbers. The second problem is less obvious. It is caused by the pace bunny pages in the mileage groups. To generate the pace chart, the server had to do lots of searching and adding. And if multiple users are viewing the pace charts, the server grinds to a halt and you are affected even though you may not even belong to a mileage group. I started work on the summary page for the new log this week. One of the goals was to make it load faster by not having to do unneeded calculations. For example, there is no need to calculate your mileage from previous years since that hardly ever changes if it's changed at all. This change was simple and surprisingly effective. As an added bonus, it made the YTD charts in the mileage groups load very fast. I decided to add this fix now instead of waiting for the new log to complete because of the performance improvement to the server. Hopefully, we will no longer experience long lags. You can also click away at the pace charts without having to wait a long time for them to load anymore. Also, I added a bit of code to remove users that reached their yearly mileage goal from the pace charts so that other users can have a chance to be on the first page. These users will no longer need to leave the groups. It's up to the administrators of these groups to decide how to acknowledge their achievements. eric :-)

      Nice work as always, Eric. And thanks for updating us at quarter to four this morning!!! What kind of techno beats were you rocking during last nights all-night coding marathon?

      Runners run


        Awesome job, Eric. The site is noticeably faster. I knew something happened when I loaded up my pace group this AM.

        I ran a mile and I liked it, liked it, liked it.


        eric :)

          I was on some kind of high last night. It's as all the planets aligned or something after I got out of work. Even the miles on the treadmill flew by which they never did. Besides, this fix required some server down time and I didn't want to affect too many users. The night owls in Alaska (you know who you are) and the folks in Europe and Asia took the hit for a while though but it's worth it if it means the frequency of slow server response is reduced greatly.

          Professional Noob

            Thanks for your hard work. Again. The only reason that RA is such a great site is that YOU do such great work. But 3AM? That's insane, man!

            Roads were made for journeys...



              <3 :d>

              Getting the wind knocked out of you is the only way to

              remind your lungs how much they like the taste of air.    

                   ~ Sarah Kay

              Into the wild

                Bien fait Eric.

                Shut up and run


                  Thanks again, Eric!

                  Run to Win
                  25 Marathons, 17 Ultras, 16 States (Full List)

                    Thanks Eric, great work!!

                    "The drops of rain make a hole in the stone, not by violence, but by oft falling." - Lucretius

                    Go Pre!

                      many thanks and appreciations from the great white north!
                        Thanks Eric. I noticed a BIG improvement in the 1000-mile club load time!