為什麼最小化的程式常常又很慢地開啟?

這似乎特別違反直覺:你最小化一個應用程式是因為你計劃稍後返回它,並希望跳過關閉應用程式和稍後重新啟動它,但有時最大化它甚至需要比重新啟動它更長的時間。有什麼好處?...

為什麼最小化的程式常常又很慢地開啟?

這似乎特別違反直覺:你最小化一個應用程式是因為你計劃稍後返回它,並希望跳過關閉應用程式和稍後重新啟動它,但有時最大化它甚至需要比重新啟動它更長的時間。有什麼好處?

今天的問答環節是由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
  • 閱讀 ( 41 )
  • 分類:網際網路

你可能感興趣的文章

為什麼我的android手機即使有很好的規格也很慢?

... 下面是如何透過市場宣傳,並發現為什麼有些**更好(或更糟)比他們在紙上看。 ...

  • 發佈於 2021-03-12 10:32
  • 閲讀 ( 50 )

如何使用鍵盤快捷鍵導航windows 10工作列

... 最後,按Win+D顯示桌面,按Win+M最小化所有視窗。這比手動單擊每個視窗上的最小化按鈕快得多。 ...

  • 發佈於 2021-03-15 15:58
  • 閲讀 ( 52 )

不使用photoshop開啟psd檔案的7種最佳方法

... 我一直很尊重你油漆.NET因為它清楚地知道自己想要成為什麼:一個比微軟的Paint更好的影象編輯器,而不像GIMP和adobephotoshop那樣臃腫或害怕學習。它正好在中間。 ...

  • 發佈於 2021-03-23 08:49
  • 閲讀 ( 48 )

11款極簡mac應用程式,簡化您的工作流程

...易設定,足以處理所有電子郵件。但乍一看會覺得很亂。為什麼不讓它成為一個更好的電子郵件客戶端只是幾個快速調整? ...

  • 發佈於 2021-03-23 10:23
  • 閲讀 ( 45 )

在ipad上拆分檢視和幻燈片有什麼區別?

...用程式的工作方式略有不同。我們來談談它們的異同。 什麼是拆分檢視(split view)? 拆分檢視和幻燈片的主要區別在於,在使用多個應用程式時,每個應用程式佔用的螢幕空間有多大。它們在功能上也有所不同,每種都適合不...

  • 發佈於 2021-04-02 09:23
  • 閲讀 ( 39 )

利用alexa的日常活動改善你的早晨

...以設定時間限制(如果您選擇了播放列表)。無論你選擇什麼時間限制,Alexa都會停止播放音樂。否則,它將一直播放到播放列表的末尾,或者您將其關閉。 輕觸右上角的“下一步”。 檢查一下你所有的常規動作都是正確的,...

  • 發佈於 2021-04-03 17:45
  • 閲讀 ( 38 )

為什麼android手機會隨著時間的推移而變慢,以及如何加速它們

...。但是每個平臺的解決方案略有不同,所以讓我們來談談為什麼在Android上會出現這種情況,以及如何修復它。 作業系統更新和更重的應用程式需要更多的資源 你的Android**沒有一年前的軟體(至少應該沒有)。如果你收到了And...

  • 發佈於 2021-04-06 22:35
  • 閲讀 ( 60 )

10種快速加速執行Windows7、8或10的慢速pc的方法

...來有點慢。例如,如果禁用關聯的動畫,Windows可以立即最小化和最大化視窗。 要禁用動畫,請按Windows鍵+X或右鍵單擊“開始”按鈕並選擇“系統”。單擊左側的“高階系統設定”,然後單擊“效能”下的“設定”按鈕。選擇“...

  • 發佈於 2021-04-08 18:02
  • 閲讀 ( 44 )

為什麼我的下載速度比我付費的網際網路慢?

...系統使用的位元組系統是一組8位串在一起的位。 相關:為什麼你可能得不到你支付的網速(以及如何判斷) 這一區別是表面上,一切似乎都會破裂。你知道,你有一個寬頻連線,它每秒可以40兆位元(在理想的條件下,40000000...

  • 發佈於 2021-04-08 22:55
  • 閲讀 ( 49 )

為什麼重啟電腦能解決這麼多問題?

...啟動計算機實際上可以解決許多問題。 這是怎麼回事?為什麼重置裝置或重新啟動程式可以解決這麼多問題?為什麼極客們不試著去發現和解決問題,而不是用“重置它”這個鈍錘呢? 這不僅僅是關於windows 請記住,此解決方...

  • 發佈於 2021-04-09 03:53
  • 閲讀 ( 58 )
Tao0871198
Tao0871198

0 篇文章

作家榜

  1. admin 0 文章
  2. 孫小欽 0 文章
  3. JVhby0 0 文章
  4. fvpvzrr 0 文章
  5. 0sus8kksc 0 文章
  6. zsfn1903 0 文章
  7. w91395898 0 文章
  8. SuperQueen123 0 文章

相關推薦