TE
科技回声
首页24小时热榜最新最佳问答展示工作
GitHubTwitter
首页

科技回声

基于 Next.js 构建的科技新闻平台,提供全球科技新闻和讨论内容。

GitHubTwitter

首页

首页最新最佳问答展示工作

资源链接

HackerNews API原版 HackerNewsNext.js

© 2025 科技回声. 版权所有。

Porting Firefox to Apple Silicon

644 点作者 sylvestre超过 4 年前

21 条评论

loufe超过 4 年前
We talk often on this forum of how innaccessible giants like Google and Amazon are for the little guy. I thus found this point particularly interesting:<p>&gt;&quot;Attempts to contact the vendor through regular support channels were unsuccessful so we ended up searching LinkedIn and managed to find an engineer working on the core antivirus detection. They immediately understood the seriousness of the problem and took prompt action to get a fix shipped, thus preventing quite the disaster for the users of this product. It’s notable that without this last-ditch effort we would have been effectively blocked from releasing a native Apple Silicon version for an indefinite period.&quot;
评论 #25849287 未加载
评论 #25849393 未加载
评论 #25851872 未加载
评论 #25849280 未加载
评论 #25849058 未加载
评论 #25854835 未加载
评论 #25850267 未加载
评论 #25849248 未加载
评论 #25854440 未加载
评论 #25857822 未加载
评论 #25852774 未加载
评论 #25858634 未加载
评论 #25849125 未加载
评论 #25852743 未加载
评论 #25855297 未加载
评论 #25851198 未加载
评论 #25856908 未加载
评论 #25852052 未加载
评论 #25849130 未加载
r00fus超过 4 年前
&gt; The Apple Silicon chips are one of the first desktop chips that are a heterogeneous design with distinct performance and efficiency cores. We’re revising much of our core threading and thread pooling architecture to handle the distinction better, improve efficiency, and eventually be able to schedule less performance-critical tasks on the efficiency cores.<p>I found this bit interesting. Likely more prevalent in mobile apps, but perhaps shifting desktop code to Big.Little approach and using core affinity will result in a lot less wasted energy.
markdog12超过 4 年前
Got a kick out of one of the bugzilla links:<p><a href="https:&#x2F;&#x2F;bugzilla.mozilla.org&#x2F;show_bug.cgi?id=34572" rel="nofollow">https:&#x2F;&#x2F;bugzilla.mozilla.org&#x2F;show_bug.cgi?id=34572</a><p>&quot;Use native context menus on Mac OS&quot;<p>&quot;Opened 21 years ago&quot;
评论 #25853630 未加载
评论 #25854314 未加载
评论 #25853756 未加载
评论 #25853605 未加载
green-bottle超过 4 年前
A bit tangential to the main topic of the post. They mention that they are working on another optimizing compiler Ion which will replace the cranelift compiler (which is still in nightly) as the new compiler for WebAssembly.<p>They link the issue [1] tracking the change which also speaks about disabling cranelift.<p>To my knowledge cranelift was made for the purpose of compiling WebAssembly in Firefox, so I am not sure if I am missing something here (it&#x27;s not yet production ready maybe). The Cranelift README[2] mentions that it will be a backend for IonMonkey.<p>I am a complete layman here so I am curious if someone here has a better understanding.<p>[1] <a href="https:&#x2F;&#x2F;bugzilla.mozilla.org&#x2F;show_bug.cgi?id=1687626" rel="nofollow">https:&#x2F;&#x2F;bugzilla.mozilla.org&#x2F;show_bug.cgi?id=1687626</a><p>[2] <a href="https:&#x2F;&#x2F;github.com&#x2F;bytecodealliance&#x2F;wasmtime&#x2F;tree&#x2F;main&#x2F;cranelift" rel="nofollow">https:&#x2F;&#x2F;github.com&#x2F;bytecodealliance&#x2F;wasmtime&#x2F;tree&#x2F;main&#x2F;crane...</a>
评论 #25851259 未加载
评论 #25850434 未加载
评论 #25850996 未加载
kevincox超过 4 年前
I&#x27;m surprised that Rosetta 2 isn&#x27;t installed by default. It seems that for the next couple of years the vast majority of people will need at least one x86 app.<p>I guess split-architecture applications were also not foreseen as it is clear that the auto-install prompt doesn&#x27;t work very well in that case.
评论 #25851129 未加载
评论 #25857525 未加载
评论 #25851736 未加载
评论 #25850762 未加载
评论 #25852267 未加载
brundolf超过 4 年前
&gt; If the user visits such a site, Firefox will automatically download and install such a proprietary EME&#x2F;CDM module. This presented a problem to us as we would be dependent on those third-party vendors to publish ARM64 versions of those decoders.<p>Wait, modern browsers still download and run native binaries at the request of certain sites? How is this different from the days when native plugins like Flash were massive security liabilities? I thought we didn&#x27;t do that anymore?
评论 #25849697 未加载
评论 #25853033 未加载
评论 #25853941 未加载
ed25519FUUU超过 4 年前
&gt; <i>Rust in particular was a concern. Firefox depends on Rust code, and we require a working Rust compiler to build the browser. Although Apple Silicon support for Rust was underway, it took until mid-August for there to be functional compiler builds, which limited the amount of progress possible for Firefox.</i><p>Lack of rust support for 64-bit ARM was a bit surprising to me, especially given the velocity in which people have been rewriting certain components in Rust.<p>Take for example ffmpeg failing to compile because librsvg was rewritten in rust: <a href="https:&#x2F;&#x2F;trac.macports.org&#x2F;ticket&#x2F;61668" rel="nofollow">https:&#x2F;&#x2F;trac.macports.org&#x2F;ticket&#x2F;61668</a>
评论 #25853653 未加载
评论 #25853512 未加载
评论 #25854239 未加载
liquidify超过 4 年前
Love you firefox. Keep fighting the good fight. Keep that budget figured out.
chris_wot超过 4 年前
As they linked to the LibreOffice bug that we hit,[1] it might be worthwhile explaining how the cross platform architecture works in LibreOffice.<p>The widgeting&#x2F;graphics library is actually run by something called VCL (the Visual Component Library). It&#x27;s a bit of a mess to be honest, but the simplified version is that there is a class called OutputDevice that the rest of the app uses, which basically acts as a fascade over a platform specific class called SalGraphics (there are a number of other platform specific classes, SalGraphics is what I focus on here).<p>Basically it is a class that implements a bunch of primitive drawing functions which call on abstract functions. We then implement these functions in a platform specific class.<p>To see the guts of the Mac class, see AquaSalGraphics [2] - and no, none of know why it was named &quot;Aqua&quot;... our codebase is <i>old</i>.<p>FWIW, OutputDevice has serious issues. I have detailed them in a mailing list post. [3]<p>1. <a href="https:&#x2F;&#x2F;bugs.documentfoundation.org&#x2F;show_bug.cgi?id=138122" rel="nofollow">https:&#x2F;&#x2F;bugs.documentfoundation.org&#x2F;show_bug.cgi?id=138122</a><p>2. <a href="https:&#x2F;&#x2F;opengrok.libreoffice.org&#x2F;xref&#x2F;core&#x2F;vcl&#x2F;inc&#x2F;quartz&#x2F;salgdi.h?r=e7ace1d0#133" rel="nofollow">https:&#x2F;&#x2F;opengrok.libreoffice.org&#x2F;xref&#x2F;core&#x2F;vcl&#x2F;inc&#x2F;quartz&#x2F;sa...</a><p>3. <a href="https:&#x2F;&#x2F;lists.freedesktop.org&#x2F;archives&#x2F;libreoffice&#x2F;2020-December&#x2F;086546.html" rel="nofollow">https:&#x2F;&#x2F;lists.freedesktop.org&#x2F;archives&#x2F;libreoffice&#x2F;2020-Dece...</a>
评论 #25860920 未加载
评论 #25865525 未加载
fomine3超过 4 年前
For who curious, the antivirus that caused problem looks like Norton 360.<p><a href="https:&#x2F;&#x2F;bugzilla.mozilla.org&#x2F;show_bug.cgi?id=1682834#c39" rel="nofollow">https:&#x2F;&#x2F;bugzilla.mozilla.org&#x2F;show_bug.cgi?id=1682834#c39</a>
Toutouxc超过 4 年前
&gt; It’s notable that without this last-ditch effort we would have been effectively blocked from releasing a native Apple Silicon version for an indefinite period.<p>Effectively blocked from releasing it for the single-digit-percentage of people who run an antivirus on a Mac.<p>Does anyone have credible numbers on this?
评论 #25852580 未加载
评论 #25857531 未加载
评论 #25852550 未加载
MrBuddyCasino超过 4 年前
&gt; The Apple Silicon chips are one of the first desktop chips that are a heterogeneous design with distinct performance and efficiency cores. We’re revising much of our core threading and thread pooling architecture to handle the distinction better, improve efficiency, and eventually be able to schedule less performance-critical tasks on the efficiency cores.<p>Isn&#x27;t this at the wrong abstraction level? I would expect this to be a job for the OS scheduler.
评论 #25857147 未加载
masklinn超过 4 年前
&gt; Apple introduced a translation cache that likely removes this overhead completely for most applications but it does not work for code that is output by a JIT. With the native build, this second translation is avoided completely and we’re back to having a snappy browser.<p>Indeed while Rosetta does have support for JITs (which is really impressive in and of itself), every piece of machine code generated by the JIT has to be translated on the fly.<p>While the hiccup at the initial run is not too costly &#x2F; annoying for a regular application being AOT-compiled in its entirety and Apple can then shove the result somewhere nearby, for a JIT it&#x27;s basically constant, continuous overhead which can&#x27;t be cached because it won&#x27;t be around next run. I&#x27;m not surprised that the gains are significant there.
wooger超过 4 年前
Wait, what? People run anti-virus on Macs? What proportion of the userbase is this?<p>It&#x27;s good to hear from Mozilla doing some browser developmenmt, and not making bizarre political announcements that an authoritarian shutdown of a social network by a cartel of tech giants is &quot;not enough&quot;.
评论 #25857603 未加载
pixelpoet超过 4 年前
Oh hey, the author is also the guy who developed the amazing open source AlphaGo reimplementation Leela Zero: <a href="https:&#x2F;&#x2F;en.wikipedia.org&#x2F;wiki&#x2F;Leela_Zero" rel="nofollow">https:&#x2F;&#x2F;en.wikipedia.org&#x2F;wiki&#x2F;Leela_Zero</a>
mugivarra69超过 4 年前
does firefox use llvm to compile ?
评论 #25849349 未加载
评论 #25849661 未加载
fernly超过 4 年前
What an interesting and informative article! Nicely done!
CyberRabbi超过 4 年前
Is “apple silicon” the port job here? Isn’t this more correctly described as a port of their existing ARM64 target to macOS?
评论 #25849406 未加载
评论 #25850091 未加载
评论 #25851095 未加载
评论 #25850877 未加载
评论 #25849580 未加载
johndoe42377超过 4 年前
What porting? Isn&#x27;t C++ the most portable language in existence? Oh, there is also Rust. But isn&#x27;t it just uses an LLVM codegen, same as Swift or clang? So, there is Rust&#x27;s stdlib.<p>Seems like these abstractions are not exactly zero-cost?
评论 #25856324 未加载
jonny383超过 4 年前
I wonder if Mozilla regrets laying off 25% of their engineering team [0] given their rapidly declining browser market share [1], and their rapidly declining performance. Not to mention their forced adoption of the new Firefox on Android which disables all add-ons except Mozilla approved ones, despite their promises to correct this [2].<p>Mozilla _used_ to be about open internet and security, but that&#x27;s just a false pretense at this point [3][4].<p>I believe it&#x27;s time to embrace Chromium &#x2F; Blink, throw away the idea of internet freedom and just use the best performing browser of the week.<p>[0] <a href="https:&#x2F;&#x2F;thenextweb.com&#x2F;insights&#x2F;2020&#x2F;08&#x2F;11&#x2F;mozilla-firefox-layoffs-250-employees&#x2F;" rel="nofollow">https:&#x2F;&#x2F;thenextweb.com&#x2F;insights&#x2F;2020&#x2F;08&#x2F;11&#x2F;mozilla-firefox-l...</a><p>[1] <a href="https:&#x2F;&#x2F;en.wikipedia.org&#x2F;wiki&#x2F;Usage_share_of_web_browsers" rel="nofollow">https:&#x2F;&#x2F;en.wikipedia.org&#x2F;wiki&#x2F;Usage_share_of_web_browsers</a><p>[2] <a href="https:&#x2F;&#x2F;www.androidpolice.com&#x2F;2020&#x2F;09&#x2F;03&#x2F;firefox-update-faces-backlash-due-to-missing-features-and-few-supported-extensions&#x2F;" rel="nofollow">https:&#x2F;&#x2F;www.androidpolice.com&#x2F;2020&#x2F;09&#x2F;03&#x2F;firefox-update-face...</a><p>[3] <a href="https:&#x2F;&#x2F;blog.mozilla.org&#x2F;blog&#x2F;2021&#x2F;01&#x2F;08&#x2F;we-need-more-than-deplatforming&#x2F;" rel="nofollow">https:&#x2F;&#x2F;blog.mozilla.org&#x2F;blog&#x2F;2021&#x2F;01&#x2F;08&#x2F;we-need-more-than-d...</a><p>[4] <a href="https:&#x2F;&#x2F;www.theverge.com&#x2F;2017&#x2F;12&#x2F;16&#x2F;16784628&#x2F;mozilla-mr-robot-arg-plugin-firefox-looking-glass" rel="nofollow">https:&#x2F;&#x2F;www.theverge.com&#x2F;2017&#x2F;12&#x2F;16&#x2F;16784628&#x2F;mozilla-mr-robo...</a>
评论 #25855632 未加载
评论 #25855546 未加载
评论 #25855766 未加载
shrimpx超过 4 年前
FYI you still cannot get a full native experience with Chrome and Firefox, due to plugins that have not been ported.<p>For example Chrome ships with an x64 version of Widevine, a plugin that is required to watch live streams on YouTube TV (and perhaps other services with live TV). Currently, YouTube TV does not work natively in Chrome or Firefox.<p>All that said, it will work fine if you run Rosetta -- the x64 decoder will run in Rosetta.
评论 #25852430 未加载