两个扩展还是一个?

发布于 2024-12-18 19:14:34 字数 86 浏览 1 评论 0原文

如果 Firefox 扩展实现了两种不同的功能,那么将其实现为两个扩展更好还是创建一个具有这两种功能的扩展更好?如果您的分机数量较少,是否会有一定的速度优势?

If the firefox extension implements two different functionalities is it better to implement it as two extensions or to create one extension with both functionalities? Is there some speed advantage if you have fewer extensions?

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

清晰传感 2024-12-25 19:14:34

更多扩展会带来一些性能成本(例如启动时稍微多一些的 I/O),但它相当小,特别是与扩展所做的事情相比。

如果您好奇,您可以衡量一下对您来说有什么区别 。我预计<在现代机器上,热启动需要 50 毫秒,对于冷启动,除了 Firefox 在启动时涉及的几十个其他文件外,它还只是一个文件(假设您没有设置 em:unpack)。

我说,如果它是公共扩展,请使用单独的扩展:大多数人可能只会使用其中之一。如果只是为了自己的利益,那我认为没关系。

There is some perf cost associated with more extensions (e.g. slightly more I/O on startup), but it's rather small, especially when compared with things the extensions do.

If you're curious, you could measure what the difference is for you. I expect < 50ms on warm startup on a modern machine and for cold startup it's just one more file (assuming you don't set em:unpack) in addition to a couple dozen other files Firefox touches on startup.

I say, go with separate extensions if it's a public extension: most people will probably use just one of them. If it's just something for yourself, then it doesn't matter, in my opinion.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文