Redian新闻
>
提高Lion中Safari的性能:关闭多线程窗口功能 (转载)
avatar
提高Lion中Safari的性能:关闭多线程窗口功能 (转载)# PhotoGear - 摄影器材
s*y
1
【 以下文字转载自 Apple 讨论区 】
发信人: Neoly1983 (Neo_ly1983), 信区: Apple
标 题: 提高Lion中Safari的性能:关闭多线程窗口功能
发信站: BBS 未名空间站 (Wed Sep 21 15:29:15 2011, 美东)
Lion中的safari和以前相比有一个奇怪的现象:如果开了很多tab的话,切换的时候会
发现他们白掉了,要重新刷新才行。这对喜欢开很多个tab的童鞋很不方便,因为不能
快速切换,每次要重新加载。
其实原因是Lion中的Safari增加了一个feature:Multi-Process windows. (详细情况
有时间的话可以读下面的文章全文)
关闭这个功能的方法:
1.Quit Safari, then launch the Terminal (located in /Applications/Utilities/
) and enter the following command:
defaults write com.apple.Safari IncludeInternalDebugMenu 1
2. Relaunch Safari and you’ll see a “Debug” menu appear on the far right,
alongside “Help” (yes, this is different from the Develop menu)
3. Pull down the new Debug menu and scroll down a ways until you see “Use
Multi-process Windows” and select it so that it’s unchecked
这时开一个新窗口,会发现白tab不再出现了~
另外感觉整体速度也有所提升,因此推荐~~
P.S. 看来这个新feature有点失败的说~~ :(
------------------
全文:
Stop Safari Auto-Refreshing Web Pages in Mac OS X Lion
A new addition to Safari 5.1 in Mac OS X 10.7 is that web pages auto-refresh
if they are left inactive for a period of time. The feature can seem
unnecessary and even annoying, but there’s no clear preference option to
disable reloading of pages. Thankfully, Stormcloud (via DaringFireball)
shows us how to stop this pesky behavior in Safari 5.1. Here’s the play-by-
play to disable it:
Quit Safari, then launch the Terminal (located in /Applications/Utilities/)
and enter the following command
defaults write com.apple.Safari IncludeInternalDebugMenu 1
Relaunch Safari and you’ll see a “Debug” menu appear on the far right,
alongside “Help” (yes, this is different from the Develop menu)
Pull down the new Debug menu and scroll down a ways until you see “Use
Multi-process Windows” and select it so that it’s unchecked
Open a new Safari window and if you see an [SP] next to the web pages title,
you’re now in single process mode, which prevents the automatic refreshing
of webpages
If you’re wondering why changing some setting called “multi-process
windows” effects automatic reloading of web pages, Stormcloud provides a
good description of what this feature is and how it works:
So what is a “multi-process window” anyway?
One of the new features in Safari 5.1 is a major new version of the
underlying engine — WebKit2. Under WebKit2’s new process architecture,
Safari consists of two separate processes — the “UI process” (the Safari
application itself, including the address bar, toolbar, bookmarks bar, menus
, etc.), and the “web process” (an independent process that loads and
displays actual web pages).
Apart from other goals, the purpose of this is to provide some measure of
crash protection. While it does prevent the entire Safari application from
crashing (at least as far as I’ve seen), it doesn’t protect you from
losing anything you’ve typed into text fields in web pages. All web content
is handled by a single web process, so if any page malfunctions and causes
the web process to crash, all open tabs will be reloaded, and anything you
had typed into any of those pages will be lost. Furthermore, any downloads
that were in progress will also be halted; you might be able to resume some
downloads, but many will have to be started over. This can be very
frustrating when downloading large files.
For that reason, the benefits of the new multi-process architecture are
somewhat dubious, at least until Apple manages to address the issue of
spontaneously reloading tabs (assuming it’s even possible to prevent this
behavior without redesigning the overall architecture of WebKit again).
Basically, it’s a well intentioned feature, but it’s also causing some
user headaches. In some cases it causes Safari to take up far more memory
than it should, and it can even cause app slow downs. Presumably all of this
will be fixed in a software update though.
The big caveat about running Safari 5.1 in single-process mode: many plugins
and extensions don’t work, most notably (and annoyingly) ad blockers,
ClickToFlash, and 1password. You’ll have to decide if that trade-off is
worth it, or you can always just use Chrome or Firefox too.
相关阅读
logo
联系我们隐私协议©2024 redian.news
Redian新闻
Redian.news刊载任何文章,不代表同意其说法或描述,仅为提供更多信息,也不构成任何建议。文章信息的合法性及真实性由其作者负责,与Redian.news及其运营公司无关。欢迎投稿,如发现稿件侵权,或作者不愿在本网发表文章,请版权拥有者通知本网处理。