Thymeleaf includes caching that can be used to cache templates, fragments, messages, and expressions. The default implementation is an in-memory cache using standard Java collections. Wouldn’t it be nice to use the Spring Cache Abstraction instead? The advantages of such a setup include: Consistency – why have many separate caching implementations each configured in different … Continue reading Using Spring Cache as the Thymeleaf Cache
Tag: performance
Improving Performance of Spring’s ShallowEtagHeaderFilter by 50%
I led the team developing a new web presence for Mackenzie Financial, an effort which involved performance testing (which is always a good practice). During that testing, I discovered that ShallowEtagHeaderFilter was generating a lot of garbage and a lot of time was being spent in it. That didn’t seem ideal so I dove in … Continue reading Improving Performance of Spring’s ShallowEtagHeaderFilter by 50%
Finding Bugs in IBM Java
The first rule of programming is “it’s always your fault.” Which, like all good rules, has some exceptions. After eliminating all other possibilities, I discovered a few issues in IBM’s Java Runtime (also known as the IBM J9 JVM) that were definitely not my fault. I consider the discovery of these issues to have been … Continue reading Finding Bugs in IBM Java
Precompiling with Web Deploy
Web Deploy is a great tool for deploying ASP.NET projects: it simplifies deployments, can target IIS 6 or 7, is pretty easy to get working on the server and the project side, and is supported by many hosting providers. It works really well when used along with continuous integration. In the first phase, the project … Continue reading Precompiling with Web Deploy
HTTP Response Caching for Java and Android
HTTP caching is both important, as it reduces bandwidth use and improves performance, and complex, as the rules are far from simple. In my experience, most Java and Android applications either don’t do HTTP caching, or they roll their own and up doing it wrong or in way too complicated a fashion. In other words, … Continue reading HTTP Response Caching for Java and Android
Best way to use HttpClient in Android
Many Android applications access the Internet resources over HTTP (and my projects are no exception). There are 2 common ways to do that: use Apache HttpClient 4.x (which is included in Android) or use HttpURLConnection (from Java). Google stated in a September 29, 2011 blog post that they prefer you use HttpURLConnection, but many apps … Continue reading Best way to use HttpClient in Android
The Coming IPv6 Evolution
Learn why IPv6 is important and how IPv4 exhaustion will affect you
Facebook Went Down – Did You?
Facebook’s downtime affected 1,000s of sites. Is having a single point of failure worth it?
Compression (deflate) and HTML, CSS, JS Minification in ASP.NET
As I’ve already demonstrated, I like performance. So I cache and compress a lot. When I was put onto an ASP.NET project at work, I obviously wanted to optimize the site, so here’s what I did. Taking some hints from Y! Slow, I decided I wanted to: Get rid of all the MS AJAX/toolkit javascript, … Continue reading Compression (deflate) and HTML, CSS, JS Minification in ASP.NET
EhCache implementation of OpenJPA caching
I usually use Hibernate, which supports a number of caching implementations (such as EhCache, oscache, JBoss, etc). My most recent project had a dependency on a product which has a dependency on OpenJPA, and OpenJPA only has it’s own built in implementations of a query cache and a data cache. I like to have one … Continue reading EhCache implementation of OpenJPA caching