Closed Bug 1726274 Opened 3 years ago Closed 3 years ago

Block view updates on fetching Fluent l10n strings

Categories

(Firefox :: Address Bar, task, P2)

task
Points:
3

Tracking

()

RESOLVED WONTFIX

People

(Reporter: adw, Unassigned)

References

Details

Bug 1725289 is fetching some l10n strings from Fluent at the start of each query so that ideally they'll be fetched and ready to use by the time they're needed. Hypothetically it's possible they might not be fetched in time since l10n.formatValue is async, although even if that's the case it'll only be a problem the first time they're used since after that they'll be cached by the caching system added in that bug. See the bug and D122550 for a whole big discussion.

We should see about blocking the view update on fetching the strings, as Zibi suggested in that bug/revision. That will require making onQueryResults and onQueryFinished async. I have a WIP patch.

Wontfixing this for now. The final revision in bug 1725289 ended up falling back to using l10n.setAttributes for strings that aren't cached, so we're not any worse off than the status quo.

It still would be ideal IMO to guarantee that strings are cached before updating the view so we could avoid all pop-in, but balancing that relatively small upside against the cost of doing it, I think it's not a high priority. And remember that any potential cache misses would only happen the first time you use the urlbar after starting Firefox.

Making view updates async is just a can of worms. My WIP patch seemed to work fine when I tested it manually, but a bunch of tests fail with it. It's the kind of thing where fixing one failure causes another. Things that tests expect to happen at certain times no longer happen at the right times. It's not impossible to fix, but it wouldn't be a small amount of work.

Assignee: adw → nobody
Status: ASSIGNED → RESOLVED
Iteration: 93.1 - Aug 9 - Aug 22 → ---
Closed: 3 years ago
Resolution: --- → WONTFIX
You need to log in before you can comment on or make changes to this bug.