Performance updates
BNETDocs
The new site's development has been on hiatus for the last few months. I put small changes in every now and then, but it's definitely not something I'm dedicating time to, since my new job as of March stifles things a bit.
Regardless of that, I have been making performance updates to this current site off and on. I recently got rid of Google Analytics and Google Adsense, and added New Relic to both the server and this site's code, for analytics of both server and browser. In doing so, New Relic was able to highlight errors in this site's code that bots were finding, as well as pages that were slow in general compared to others. If you haven't heard of New Relic before, I suggest you take a look, they have some pretty neat stuff that really help in not only recording metrics but actually understanding and making use of said metrics.
A few performance and security updates done since March:
- Nginx is used on the server instead of the previous server's Apache software. This has performance and security benefits all around. Google Nginx vs. Apache if you're curious for more detail.
- An SSL certificate was gifted from Namecheap as part of the domain transfer from Kyro back in March. The site has been forced to use SSL with all http links redirecting to https.
- Gzip compression was turned on for clients/browsers that indicate they support it via the Accept-Encoding HTTP request header. This saves a lot of bandwidth and load times on slower networks.
- Stopped using Namecheap's DNS and started using CloudFlare's DNS. Sped up resolve times for the site from ~50ms to under 5ms from my tests.
- Google Analytics and Google Adsense were removed, speeding up browser page load times by nearly 700ms on average.
- New Relic identified that a MySQL table was being queried 401 times for each page request. I restructured that part of the code to only query it once per page request. Browser page load times increased by about 50ms.
- Reconciled duplicate core files in the site's code. Previously some of the site code was using one version, and other parts of the site was using another. This caused some errors to bubble up to end users when viewing certain pages.
- Removed unused/unnecessary pages from the code, there wasn't any end user benefit to this unfortunately, but it makes managing the site easier.
- Created the cache/ directory on the server, speeding up the generatedocs page (Download BNETDocs as Text) from ~2,000ms to a mere ~50ms, or basically the average load time for any other page on this site (excluding other resources or full page loads).
Some noteworthy changes, but not related to performance or security:
- Server statuses are being updated every five minutes by a cronjob on the server.
- The BNETDocs Redux code, the Labs code, and the current "new site" code dubbed BNETDocs Phoenix are all stored in private Git repositories, which may become open-source in the future. This means that any changes to the code are either dirty changes or they're tracked in the commit history. Yes, this is me telling you that BNETDocs hasn't ever been version controlled before. Hard to believe, I know.
There may have been some other enhancements to the legacy code that I may have forgotten since March, but that really covers the bulk of it all.
Again, development hasn't stopped on the new site, but it certainly isn't going fast either. Cheers!
Comments
no one has commented yet.