21
2月
2024
优化 Mozilla FireFox 性能 - 第 2 部分
12:18

优化 Mozilla FireFox 性能 - 第 2 部分

21 2月 2024 12:18

本文致力于优化 Mozilla Firefox Web 浏览器中的代码显示。

(开始:请参阅第 1 部分)。

股票代码

在提供证券交易所新闻的网站上,会使用一条爬行线来显示汇率和各种资产(证券、黄金)的报价。 同时,一方面处理器的负载增加,另一方面要求浏览器尽可能流畅地操作“爬行”。

在这里,我在 about:config 中测试了带有股票报价或新闻行情的网站的各种 FireFox 设置。

为了节省处理器资源,使用软件节流来调节中央处理器上的负载的原理 - 应用程序中的空闲休息周期,这些空闲休息周期在工作操作之间添加。 这样做的目的是减少处理器的负载。 同时,有必要在移动文本对象(汇率和股票报价)的再现中保持最大的平滑度。

学习

测试条件见网站 rbc.ru。 使用鼠标滚动,我实现了两条蠕动线的外观,然后固定了既定值 %Cpu(s).
quote_screen

首先,我建议在 about:config 菜单中启用以下设置,以确保“爬虫”运行流畅:

dom.workers.throttling.enabled = true

右侧的数字是 top 程序(在第二个显示器上)显示的处理器负载百分比 (%) - %Cpu(s)。

我根据处理器负载调整了以下设置,同时保持动画流畅:

dom.timeout.throttling_delay
1 - 59
5 - 58
10 - 56
20 - 56
40 - 54
60 - 54
80 - 55
99 - 55
1000 - 56
30000 (默认情况下)- 55
最优值: dom.timeout.throttling_delay = 30000 (默认情况下)

dom.timeout.foreground_throttling_max_budget
(при dom.timeout.throttling_delay = 40)
-1 - 53
100 - 51-54
1000 - 53-55
最优值:: dom.timeout.foreground_throttling_max_budget = -1 (默认)

dom.timeout.budget_throttling_max_delay
-1 - 58-60
0 - 54
1 - 54-56
50 - 55-58
80 - 55-57
100 - 52-54
130 - 53-56
200 - 59-60
15000 (默认情况下)- ?
最优值:: dom.timeout.budget_throttling_max_delay = -1 (为了让行情自动收录机平稳移动)

layout.throttled_frame_rate
1 - 53
2 - 56
8 - 55
最优值: 1 (默认)

dom.animations.offscreen-throttling
false - 56
true - 53
最优值: true (默认)

media.throttle-factor
1 - 58
2 - 53
4 - 54
10 - 54
20 - 55
最优值: 2 (默认)

结论

Mozilla FireFox 中节流参数的最佳值(用于播放股票)

参数 默认值 新值
dom.workers.throttling.enabled false true
dom.timeout.budget_throttling_max_delay 15000 -1

最后修改时间:2025年12月10日



相关出版物