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

优化 Mozilla FireFox 性能 - 第 2 部分

21 2月 2024 12:18

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

(对于初学者:参见 第 1 部分 )。

跑步线

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

示例: https://www.rbc.ru/quote/ticker/338243

网页上的动画是使用相应 <DIV clas==".key-indicators__move.animate">关键股票指标

元素中的 CSS(层叠样式表)类来实现的。

CSS:

.key-indicators__move.animate
{
   animation-timing-function:linear;
   animation-iteration-count:infinite;
   animation-duration:30s;
   animation-play-state:running;
   animation-name:move
}

在这里,我在 about:config 中测试了各种 FireFox 设置,以优化包含股票报价或新闻行情的网站的显示。

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

研究

测试条件 - 网站上 红细胞网。 使用鼠标滚动,我实现了两条蠕动线的外观,然后固定了既定值 %CPU

报价屏幕

! !!注意: RBC 网站上有一个单独的页面,上面有一条“爬行线: [https://www.rbc.ru/quote/ticker/338243](https://www.rbc.ru/quote/ticker/338243 )。

首先,为了“爬行”的流畅性,我建议您启用about:config菜单中的参数:

dom.workers.throttle.enabled = true

右边的数字是程序中的处理器负载(%) top (在第二台显示器上)- %Cpu(s)。

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

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

dom.timeout.foreground_throttling_max_budget
(dom.timeout.throttle_delay = 40)
-1 - 53
100 - 51-54
1000 - 53-55
最优值: dom.timeout.foreground_throtdling_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_throtdling_max_delay = -1 (蠕动线的平滑移动)

布局.throttled_frame_rate
1 - 53
2 - 56
8 - 55
最佳值:1(默认)

dom.animations.offscreen 节流
假 - 56
正确 - 53

最佳值 true(默认)

媒体节流因子
1 - 58
2 - 53
4 - 54
10 - 54
20 - 55
最佳值 2(默认)

结论

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

参数 默认 新意义
dom.workers.throttle.enabled 真实
dom.timeout.budget_throttling_max_delay 15000 -1

最后更改:04/03/2026



相关出版物