Closed Bug 1995634 Opened 7 months ago Closed 6 months ago

Utilize nsIDocumentEncoder for Translations Language Identification

Categories

(Firefox :: Translations, task)

task

Tracking

()

RESOLVED FIXED
146 Branch
Tracking Status
firefox146 --- fixed

People

(Reporter: nordzilla, Assigned: nordzilla)

Details

Attachments

(1 file, 1 obsolete file)

Description

In Bug 1967758 I transitioned translations language identification to use the DOMExtractor code.

Initial profiling is showing that the nsIDocumentEncoder is still faster at extracting text than the DOMExtractor code.

DOMExtractor (2048 code-unit limit)

nsIDocumentEncoder (2048 code-unit limit)

In the short term, I would like to move Translations back to using nsIDocumentEncoder until such a time that we improve the performance and capabilities of DOMExtractor.

Summary: Utilize nsIDocumentEncoder for Translations → Utilize nsIDocumentEncoder for Translations Language Identification

This patch updates the Translations language-detection algorithm
to utilize nsIDocumentEncoder for the page-text extraction.

This patch adds a new Translations telemetry event
for the language identification, such that we can
get a sense of the average performance of our language
detection code in aggregate.

Attachment #9521483 - Attachment description: WIP: Bug 1995634 - Use nsIDocumentEncoder for Translations langId r=#translations-reviewers! → Bug 1995634 - Use nsIDocumentEncoder for Translations langId r=#translations-reviewers!
Attachment #9521484 - Attachment description: WIP: Bug 1995634 - Add translations langId telemetry r=#translations-reviewers! → Bug 1995634 - Add translations langId telemetry r=#translations-reviewers!

Comment on attachment 9521484 [details]
Bug 1995634 - Add translations langId telemetry r=#translations-reviewers!

Revision D269461 was moved to bug 1861698. Setting attachment 9521484 [details] to obsolete.

Attachment #9521484 - Attachment is obsolete: true
Pushed by enordin@mozilla.com: https://github.com/mozilla-firefox/firefox/commit/a07fd9772bbb https://hg.mozilla.org/integration/autoland/rev/b39c0de239fb Use nsIDocumentEncoder for Translations langId r=translations-reviewers,gregtatum

Backed out for causing tr8ns failures on browser_translations_full_page_telemetry_auto_translate.js

Backout link

Push with failures

Failure log

Pushed by enordin@mozilla.com: https://github.com/mozilla-firefox/firefox/commit/5ef169b4891f https://hg.mozilla.org/integration/autoland/rev/591439041acd Use nsIDocumentEncoder for Translations langId r=translations-reviewers,gregtatum
Status: NEW → RESOLVED
Closed: 6 months ago
Resolution: --- → FIXED
Target Milestone: --- → 146 Branch
QA Whiteboard: [qa-triage-done-c147/b146]
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: