Skip to content
This repository was archived by the owner on Nov 1, 2022. It is now read-only.
This repository was archived by the owner on Nov 1, 2022. It is now read-only.

342ms regex compile in mozilla.components.support.utils.WebURLFinder #5880

@acreskeyMoz

Description

@acreskeyMoz

When starting to type into the URL bar, a long regex compile is seen on the main Java thread.

342ms via the Gecko Profiler timeline on Pixel 3:
https://perfht.ml/2Sg0THi

kotlin.text.Regex.<init>()
mozilla.components.support.utils.WebURLFinder.<clinit>()
org.mozilla.fenix.utils.ClipboardHandler.getUrl()
org.mozilla.fenix.search.SearchFragment.onResume()
androidx.fragment.app.Fragment.performResume()
androidx.fragment.app.FragmentManager.moveToState()
androidx.fragment.app.FragmentManager.moveFragmentToExpectedState()
androidx.fragment.app.FragmentManager.moveToState()
androidx.fragment.app.FragmentManager.executeOpsTogether()
...

(I downloaded Firefox Preview from the PlayStore, Feb 10).

This looks to be related to this issue:
#5384

Perhaps this can be done before the user interacts with the URL bar?

┆Issue is synchronized with this Jira Task

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions