-
Notifications
You must be signed in to change notification settings - Fork 2.4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Optimize parseDomain in content_cosmetic.ts #17906
Comments
@atuchin-m I've tried to reproduce the problem before I verify the fix, and on macOS, using Would you mind recording a screencast (using https://www.cockos.com/licecap/ or similar) showing how to reproduce the issue? Thanks regardless! |
Setting |
@stephendonner The ticket is about a performance problem, therefore the key aspect is the time of About the Note that this js-function was completely removed in the PR and replaced with a native function. So you can't find it now in perf-traces after the fix. I suggest comparing 1.30 with a recent nightly build and you see the difference in call structure and time. |
Verified
|
Brave | 1.31.65 Chromium: 94.0.4606.61 (Official Build) dev (x86_64) |
---|---|
Revision | 418b78f5838ed0b1c69bb4e51ea0252171854915-refs/branch-heads/4606@{#1204} |
OS | macOS Version 11.6 (Build 20G165) |
Steps:
- new profile
- launched Brave
- loaded
example.com
- opened
Developer Tools
->Performance
tab - clicked on
Start profiling and reload page
- clicked
Stop
after a couple seconds - expanded the call stacks
- hovered over
parseHTML
and noted the timing inms
- compared with
1.30.86
Confirmed that we went from 91.12 ms
in 1.30.86
-> 9.69 ms
in 1.31.65
👍
1.30.86 |
1.31.65 |
---|---|
Thanks again for your help with the testcase, @atuchin-m !
Verified PASSED
using
Brave | 1.31.73 Chromium: 94.0.4606.71 (Official Build) beta (64-bit) |
---|---|
Revision | 1d32b169326531e600d836bd395efc1b53d0f6ef-refs/branch-heads/4606@{#1256} |
OS | Linux |
Steps:
- new profile
- launched Brave
- loaded
example.com
- opened
Developer Tools
->Performance
tab - clicked on
Start profiling and reload page
- clicked
Stop
after a couple seconds - expanded the call stacks
- hovered over
parseHTML
and noted the timing inms
- compared with
1.30.87
Confirmed that we went from 326.30 ms
in 1.30.87
-> 189.80 ms
in 1.31.73
👍
1.30.87 |
1.31.73 |
---|---|
Description
Optimize page load by replacing parseDomain in native cosmetic filter implementation to the faster alternative.
Steps to Reproduce
Actual result:
Expected result:
Now significant speed/memory impact.
Reproduces how often:
Every time.
Brave version (brave://version info)
Version 1.31.23 Chromium: 93.0.4577.63 (Official Build) nightly (64-bit)
Version/Channel Information:
Other Additional Information:
The text was updated successfully, but these errors were encountered: