diff --git a/mobile/android/base/GeckoAppShell.java b/mobile/android/base/GeckoAppShell.java index f826853049bb..f222c5a04b0c 100644 --- a/mobile/android/base/GeckoAppShell.java +++ b/mobile/android/base/GeckoAppShell.java @@ -323,6 +323,16 @@ public class GeckoAppShell if (type != null) combinedArgs += " " + type; + // In un-official builds, we want to load Javascript resources fresh + // with each build. In official builds, the startup cache is purged by + // the buildid mechanism, but most un-official builds don't bump the + // buildid, so we purge here instead. + if (!AppConstants.MOZILLA_OFFICIAL) { + Log.w(LOGTAG, "STARTUP PERFORMANCE WARNING: un-official build: purging the " + + "startup (JavaScript) caches."); + combinedArgs += " -purgecaches"; + } + DisplayMetrics metrics = getContext().getResources().getDisplayMetrics(); combinedArgs += " -width " + metrics.widthPixels + " -height " + metrics.heightPixels;