firefox的cpu占用率过高

在使用firefox时,启动和访问新的网页都会有几秒钟占用cpu达到100%,请问这是怎么回事?尝试把所有插件都禁用后依旧如此。

wget -c https://releases.mozilla.org/pub/firefox/candidates/57.0b3-candidates/build1/source/firefox-57.0b3.source.tar.xz

tar Jxvf firefox-57.0b3.source.tar.xz

more README.txt

在线文档可以在下载源码的时候阅读。



https://developer.mozilla.org/zh-CN/docs/Mozilla/Developer_guide/Build_Instructions

根据自己需求,使用自己喜欢的编辑器更改配置,尝试构建自己的专属火狐浏览器
Firefox57变化很大,体验超好。
Just do it!:star2:

刚才试了一下,开了几百个窗口,如丝般顺滑,一点都不卡。:rofl:

读了一遍,虽然跃跃欲试,但仍不敢轻易尝试。有几个低级问题请教:

  1. 编译安装前,是否需要卸载当前firefox;
  2. 在解压后的文件夹里建立一个.mozconfig文件,文件中填入如下内容:
. $topsrcdir/browser/config/mozconfig
mk_add_options MOZ_OBJDIR=@TOPSRCDIR@/fb-opt-static
ac_add_options --enable-optimize
ac_add_options --disable-debug
ac_add_options --enable-static
ac_add_options --disable-shared
ac_add_options --disable-tests

然后就可以编译了吗?(我就是一个普通用户,不会去做什么调试。)

$topsrcdir 变量在我的系统中还没有,如何设定该变量呢?

  1. 能解释一下/path/to/mozilla/如何设定吗?

我和你一样也是普通用户,可能经历失败的次数比你多了那么几次,唯手熟尔。
配置文件指向…共用,…。
我都是看文档自己探索,一个词一个词查,一步一步自己敲的。
https://www.gnu.org/software/make/manual/ 每加一个选项就想这是啥?为啥要加?
https://developer.mozilla.org/en-US/docs/Mozilla/Developer_guide/Build_Instructions/Configuring_Build_Options

/maybe/in/your/Work/Space

刚发现了一个花花绿绿的窗口,按F12弹出一个窗口,上面有个内存(Memery)选项,好像和内存有关?我去Google下试试看。:rofl:

  1. 阅读了链接后,在源文件目录中建立mozconfig文件,内容如下:
. $topsrcdir/browser/config/mozconfig
mk_add_options MOZ_OBJDIR=@TOPSRCDIR@/obj-firefox
ac_add_options --enable-optimize
ac_add_options --disable-debug
ac_add_options --disable-tests
  1. 运行./mach configure遇到如下问题:
 0:03.20 checking for rustc... not found
 0:03.20 checking for cargo... not found
 0:03.20 ERROR: Rust compiler not found.
 0:03.20 To compile rust language sources, you must have 'rustc' in your path.
 0:03.20 See https://www.rust-lang.org/ for more information.
 0:03.20 
 0:03.20 You can install rust by running './mach bootstrap'
 0:03.20 or by directly running the installer from https://rustup.rs/
 0:03.20 
 0:03.24 *** Fix above errors and then restart with\
 0:03.24                "/usr/bin/make -f client.mk build"
 0:03.24 client.mk:384: recipe for target 'configure' failed
 0:03.24 make: *** [configure] Error 1

你遇到这个问题了吗?要安装rustc

安装了rustc和cargo之后顺利编译了。然后怎么安装呢?

经群友提示,下载了一个现成的58版本体验了一下。个人没感觉到惊艳之处。也许是知道得太少。