Closed Bug 1753137 Opened 4 years ago Closed 4 years ago

geckoview_example unexpectedly does not load scripts from cache on start up

Categories

(GeckoView :: General, defect)

Unspecified
All
defect

Tracking

(Not tracked)

RESOLVED WORKSFORME

People

(Reporter: mcomella, Unassigned)

Details

Steps to reproduce

  • Create file called env on desktop with contents (it enables logging):
env:
    MOZ_LOG: JSComponentLoader:5
  • Push to device: adb push env /data/local/tmp/org.mozilla.geckoview_example-geckoview-config.yaml
  • Activate file: adb shell am set-debug-app --persistent org.mozilla.geckoview_example
  • Launch app, load a page
  • Wait 60s
  • Press home, force-stop app
  • Launch app
  • Grep for logs: adb logcat -d | grep -i jscomponentloader

Expected results

On the second launch, logs like:

D/JSComponentLoader Successfully loaded resource://gre/modules/addons/XPIDatabase.jsm from cache

which comes from the mozJSComponentLoader using the ScriptPreloader and other script caches.

Actual results

On first launch and second launch, we get the same slow loading (i.e. not using the cache) logs for every module like:

D/JSComponentLoader Slow loading resource://gre/modules/GeckoViewStartup.jsm

I reproduced this both when building GVE locally and from GVE builds on taskcluster. I can't reproduce this when I build fenix nightly locally with a local GVE.

There is code that is supposed to run when Firefox quits. Since there isn't an explicit quit event on mobile, we had to put in a special case. I wonder if that special case works for fenix but not GVE (since this is the type of error I'd expect from that code).

Agi pointed out that we don't put things in the cache if the build is debuggable. I confirmed that I can no longer reproduce when building GVE as a release build: closing.

Status: NEW → RESOLVED
Closed: 4 years ago
Resolution: --- → WORKSFORME
Component: GeckoViewExample → General
You need to log in before you can comment on or make changes to this bug.