为什么最小化的程序常常又很慢地打开?

这似乎特别违反直觉:你最小化一个应用程序是因为你计划稍后返回它,并希望跳过关闭应用程序和稍后重新启动它,但有时最大化它甚至需要比重新启动它更长的时间。有什么好处?...

为什么最小化的程序常常又很慢地打开?

这似乎特别违反直觉:你最小化一个应用程序是因为你计划稍后返回它,并希望跳过关闭应用程序和稍后重新启动它,但有时最大化它甚至需要比重新启动它更长的时间。有什么好处?

今天的问答环节是由SuperUser提供的,SuperUser是Stack Exchange的一个分支,是一个由社区驱动的问答网站分组。

问题

超级用户读者Bart想知道他为什么不通过应用程序最小化节省时间:

I’m working in Photoshop CS6 and multiple browsers a lot. I’m not using them all at once, so sometimes some applicati*** are minimized to taskbar for hours or days.

The problem is, when I try to maximize them from the taskbar – it sometimes takes longer than starting them! Especially Photoshop feels really weird for many seconds after finally showing up, it’s slow, unresp***ive and even sometimes totally freezes for minute or two.

It’s not a hardware problem as it’s been like that since always on all on my PCs.

Would I also notice it after upgrading my HDD to SDD and adding RAM (my main PC holds 4 GB currently)? Could guys with powerful pcs / macs tell me – does it also happen to you?

I guess OSes somehow “focus” on active software and move all the resources away from the ones that run, but are not used. Is it possible to somehow set RAM / CPU / HDD priorities or something, for let’s say, Photoshop, so it won’t slow down after long period of inactivity?

那交易是什么?为什么他发现自己在等待最小化应用程序的最大化?

答案

超级用户贡献者Allquixotic解释了原因:

Summary

The immediate problem is that the programs that you have minimized are being paged out to the “page file” on your hard disk. This symptom can be improved by installing a Solid State Disk (SSD), adding more RAM to your system, reducing the number of programs you have open, or upgrading to a newer system architecture (for instance, Ivy Bridge or Haswell). Out of these opti***, adding more RAM is generally the most effective solution.

Explanation

The default behavior of Windows is to give active applicati*** priority over inactive applicati*** for having a spot in RAM. When there’s significant memory pressure (meaning the system doesn’t have a lot of free RAM if it were to let every program have all the RAM it wants), it starts putting minimized programs into the page file, which means it writes out their contents from RAM to disk, and then makes that area of RAM free. That free RAM helps programs you’re actively using — say, your web browser — run faster, because if they need to claim a new segment of RAM (like when you open a new tab), they can do so.

This “free” RAM is also used as page cache, which means that when active programs attempt to read data on your hard disk, that data might be cached in RAM, which prevents your hard disk from being accessed to get that data. By using the majority of your RAM for page cache, and swapping out unused programs to disk, Windows is trying to improve resp***iveness of the program(s) you are actively using, by making RAM available to them, and caching the files they access in RAM instead of the hard disk.

The downside of this behavior is that minimized programs can take a while to have their contents copied from the page file, on disk, back into RAM. The time increases the larger the program’s footprint in memory. This is why you experience that delay when maximizing Photoshop.

RAM is many times faster than a hard disk (depending on the specific hardware, it can be up to several orders of magnitude). An SSD is c***iderably faster than a hard disk, but it is still slower than RAM by orders of magnitude. Having your page file on an SSD will help, but it will also wear out the SSD more quickly than usual if your page file is heavily utilized due to RAM pressure.

Remedies

Here is an explanation of the available remedies, and their general effectiveness:

  • Installing more RAM: This is the recommended path. If your system does not support more RAM than you already have installed, you will need to upgrade more of your system: possibly your motherboard, CPU, chassis, power supply, etc. depending on how old it is. If it’s a laptop, chances are you’ll have to buy an entire new laptop that supports more installed RAM. When you install more RAM, you reduce memory pressure, which reduces use of the page file, which is a good thing all around. You also make available more RAM for page cache, which will make all programs that access the hard disk run faster. As of Q4 2013, my personal recommendation is that you have at least 8 GB of RAM for a desktop or laptop whose purpose is anything more complex than web browsing and email. That means photo editing, video editing/viewing, playing computer games, audio editing or recording, programming / development, etc. all should have at least 8 GB of RAM, if not more.
  • Run fewer programs at a time: This will only work if the programs you are running do not use a lot of memory on their own. Unfortunately, Adobe Creative Suite products such as Photoshop CS6 are known for using an enormous amount of memory. This also limits your multitasking ability. It’s a temporary, free remedy, but it can be an inconvenience to close down your web browser or Word every time you start Photoshop, for instance. This also wouldn’t stop Photoshop from being swapped when minimizing it, so it really isn’t a very effective solution. It only helps in some specific situati***.
  • Install an SSD: If your page file is on an SSD, the SSD’s improved speed compared to a hard disk will result in generally improved performance when the page file has to be read from or written to. Be aware that SSDs are not designed to withstand a very frequent and c***tant random stream of writes; they can only be written over a limited number of times before they start to break down. Heavy use of a page file is not a particularly good workload for an SSD. You should install an SSD in combination with a large amount of RAM if you want maximum performance while preserving the longevity of the SSD.
  • Use a newer system architecture: Depending on the age of your system, you may be using an out of date system architecture. The “system architecture” is generally defined as the “generation” (think generati*** like children, parents, grandparents, etc.) of the motherboard and CPU. Newer generati*** generally support faster I/O (input/output), better memory bandwidth, lower latency, and less contention over shared resources, instead providing dedicated links between components. For example, starting with the “Nehalem” generation (around 2009), the Front-Side Bus (FSB) was eliminated, which removed a common bottleneck, because almost all system components had to share the same FSB for tran**itting data. This was replaced with a “point to point” architecture, meaning that each component gets its own dedicated “lane” to the CPU, which continues to be improved every few years with new generati***. You will generally see a more significant improvement in overall system performance depending on the “gap” between your computer’s architecture and the latest one available. For example, a Pentium 4 architecture from 2004 is going to see a much more significant improvement upgrading to “Haswell” (the latest as of Q4 2013) than a “Sandy Bridge” architecture from ~2010.

Links

Related questi***:

How to reduce disk thrashing (paging)?

Windows Swap (Page File): Enable or Disable?

Also, just in case you’re c***idering it, you really shouldn’t disable the page file, as this will only make matters worse; see here.

而且,如果您需要额外的说服力来保留Windows页面文件,请参阅这里和这里。


有什么要补充的解释吗?在评论中发出声音。想从其他精通技术的Stack Exchange用户那里了解更多答案吗?在这里查看完整的讨论主题。

  • 发表于 2021-04-11 14:56
  • 阅读 ( 197 )
  • 分类:互联网

你可能感兴趣的文章

如何控制windows10的数据和带宽使用

...,即使最近推出了“延迟更新”,它仍然可能令人讨厌。为什么?因为从来没有办法限制它使用的带宽。你必须使用第三方应用程序。 ...

  • 发布于 2021-03-13 07:30
  • 阅读 ( 182 )

10种简单的方法来调整你的mac以获得最佳性能

... 禁用放大。 选择使用缩放效果最小化窗口。 禁用打开应用程序的动画。 禁用自动隐藏和显示停靠。 ...

  • 发布于 2021-03-16 11:22
  • 阅读 ( 221 )

11款极简mac应用程序,简化您的工作流程

...易设置,足以处理所有电子邮件。但乍一看会觉得很乱。为什么不让它成为一个更好的电子邮件客户端只是几个快速调整? ...

  • 发布于 2021-03-23 10:23
  • 阅读 ( 192 )

如何在mac上隐藏任何东西:生产力指南

...功能,你想摆脱,但这是很费时的。在你找到答案之前,为什么不把这些特征的所有证据都藏起来呢? ...

  • 发布于 2021-03-26 11:53
  • 阅读 ( 233 )

最好的macos键盘快捷键你应该使用

... 快速退出应用程序 相关报道:当我按下红色的X按钮时,为什么Mac应用程序保持打开状态? 仅仅因为你点击了应用程序窗口左上角的红色小X,并不能让应用程序真正退出。这在macOS中是一个很大的区别:与Windows不同,在Windows中...

  • 发布于 2021-04-08 17:09
  • 阅读 ( 180 )

10种快速加速运行Windows7、8或10的慢速pc的方法

...来有点慢。例如,如果禁用关联的动画,Windows可以立即最小化和最大化窗口。 要禁用动画,请按Windows键+X或右键单击“开始”按钮并选择“系统”。单击左侧的“高级系统设置”,然后单击“性能”下的“设置”按钮。选择“...

  • 发布于 2021-04-08 18:02
  • 阅读 ( 483 )

使用手动刷新可节省任何平板电脑或智能手机的电池寿命

...其他平板电脑)放在一边,让它的电池消耗得更慢。 你为什么要这么做 当你的平板电脑或智能**只是坐在那里,无所事事时,它使用的电池电量更少。但是一个典型的移动设备总是在不停地醒来。如果您有一个配置为“fetch”...

  • 发布于 2021-04-11 00:18
  • 阅读 ( 190 )

如何在Windows8中关闭或最小化全屏metro应用程序

...标),以及Metro版IE中打开的两个选项卡(方形图标)。 最小化metro应用程序 如果你想要一个地铁应用程序的方式,但你不想关闭它,你可以最小化它。一种方法是将鼠标移动到屏幕最下方的左上角,以显示“开始屏幕”小按钮...

  • 发布于 2021-04-12 08:13
  • 阅读 ( 135 )

把窥探的目光从你的窗户上移开

...睛可能会打开它们,看到你统治世界的秘密计划。这就是为什么!进来了。它允许你在最小化窗口的同时按住Ctrl键来锁定你的应用程序。 安装锁后!您可能需要立即更改默认密码。右键单击系统托盘中的锁定图标,然后选择...

  • 发布于 2021-04-14 00:23
  • 阅读 ( 137 )

netflix通过新的播放速度控制,让人们可以更快或更慢地观看东西

...创作者的担忧,”一位发言人告诉《边缘报》。“这就是为什么我们限制了播放速度的范围,并要求会员在每次观看新节目时改变播放速度,而不是根据上次使用的速度来调整设置。”
 可以理解的是,创意界希望以一种特定...

  • 发布于 2021-04-18 20:47
  • 阅读 ( 175 )
Tao0871198
Tao0871198

0 篇文章

相关推荐