c# - How to reduce memory consumption when app is minimized for x amount of time -


this common problem windows. on years, it's i've noticed , it's aggrevating me point don't want make apps anymore. i've decided try , fix within own apps.

when minimize app (for example, visual studio, windows explorer, internet explorer, chrome, or any other app ever made) , leave there while, there huge delay (of anywhere between 3 20 seconds) between time click icon in taskbar until time has reached windowstate.normal again.

why this? why doesn't windows suspend processes when minimized on desktop? , how can solve problem within own apps?

i have thought using timer. start timer when minimize app, let run while , say, after 10-15 minutes of being minimized, if hasn't been restored yet, start releasing resources in hopes of freeing memory - assume make response time quicker doesn't feel i'm waiting in er when try un-minimize app. not sure if timer right way deal problem, , i'm not sure if right solution. know i'm getting sick of , need something.

has dealt before? there articles out there or there msdn documentation addresses things this?

how can better manage resources in apps don't become slow when inactive little while?

  • this problem common app. not mine.

edit: i'm not sure do. make use of using() whenever implements idisposable, , don't know how else can try , free resources or speed response times.

the symptomes describe seem indicate machine lacks physical memory. when minimize application , activate another, minimized application has many of memory pages swapped out disk. when activate application, pages belonging other applications swapped out disk , perviously swapped out pages belonging application activated swapped physical memory, taking long time due relatively slowness of hard drive. solution: add more ram, it's relatively cheap. if o.s. 32 bit, can go 4gb. if o.s. 64 bit, whatever motherboard supports limit.


Comments

Popular posts from this blog

java - nested exception is org.hibernate.exception.SQLGrammarException: could not extract ResultSet Hibernate+SpringMVC -

sql - Postgresql tables exists, but getting "relation does not exist" when querying -

asp.net mvc - breakpoint on javascript in CSHTML? -