Okay, maybe not just, as these changes have been put in place and tested for a week or so prior to this post, but I thought it would be good to let everyone know. NovelRank, including the blog, has had a major speed bump due to a few changes I’ve made to ensure pages load faster, especially for those located outside of the United States. The service costs a few more dollars each month, but I believe it is a worthwhile investment.
The second improvement was the storage of the data that is accessed by 95% of the visits to the site. This included the sales rank and sales estimates for books for the current and previous month. Previously, it required looking through almost 100,000,000 database records (over-simplified). Now, it involves, at max, 10,000,000 records. If that seems like it would be 1/10th of the time to access the data, but the improvement is actually much greater. The problem is not linear, so making this improvement (as well as changing the storage method), allowed more concurrent connections and less records to calculate. There was only one downside: Book details displaying average, minimum, and maximum sales rank is calculated from the last 2 months of data, rather than since the beginning of tracking. This change made a notable speed improvement, so I believe it is a valuable trade-off.
Recent chart data will be quick. However, if you pull data for the last 90 days or longer in the chart, it will still take a few seconds longer that recent charts. Finally, this improvement was also put into place for the NovelRank private API, which is the method used to access data by the upcoming iPhone app. When it is released, I’ll have a full write-up on the application. I also hope to have a few new features available for user accounts in the near future, so stay tuned.