Open Bug 1820252 Opened 1 year ago Updated 3 months ago

Add an IntersectionObserver to prioritize translations

Categories

(Firefox :: Translations, enhancement, P3)

enhancement

Tracking

()

People

(Reporter: gregtatum, Unassigned)

References

(Blocks 3 open bugs)

Details

Translations are CPU-intensive and take time. This means that they can be bad for power usage and battery life. The current implementation manually checks the bounding client rect. Rather than doing this we should use an IntersectionObserver to decide what to translate. This observer should continuously adjust the WorkQueue so that only the necessary translations are done.

This should cut down on a very large percentage of translations that a user will never see.

Blocks: 1837421
No longer blocks: 1820214
No longer blocks: fx-translation

Maybe this will help improve performance when translating Wikipedia popups (see bug 1845776).

Hi Greg, please where can i find the file for the bug ?

Flags: needinfo?(gtatum)

Hello Erick please can i get the file location ?

Flags: needinfo?(enordin)
Flags: needinfo?(enordin)

Okay thank you i am reading the documentation and trying to understand the code code so i can work on submitting a patch

Blocks: 1878075
You need to log in before you can comment on or make changes to this bug.