The Naked Scientists

The Naked Scientists Forum

Author Topic: Why go through "normal" shutdown procedures for programs such as Firefox?  (Read 5259 times)

Offline CliffordK

  • Neilep Level Member
  • ******
  • Posts: 6321
  • Thanked: 3 times
  • Site Moderator
    • View Profile
Every once in a while, I find Firefox is using far too much memory, perhaps due to my bad habit of opening multiple windows, and using lots of tabs. 

Should one use the "normal" shutdown?  Or just use the task manager and kill the process?

Why does it sometimes take forever to close a window?  Do websites have a "phone-home" portion?  WHY?

I realize that applications such as Wordprocessors or Spreadsheets will have a "saved file" check on closing.  But, for most other applications, I would just like it to quit immediately when closing. 

The memory manager should be able to deal with memory.  Is the problem dealing with temporary files?  Is there a better way to deal with temporary files, perhaps using a garbage collection routine like memory?


 

Offline RD

  • Neilep Level Member
  • ******
  • Posts: 8128
  • Thanked: 53 times
    • View Profile
Why does it sometimes take forever to close a [firefox] window?

FireFox addons can be the cause of such problems: conflicts (deadlock) and loops slowing things down ...

Quote
When Firefox makes an NPAPI call to a plugin which is running in its own process, the NPAPI call is translated into an inter-process communication (IPC) request that is posted to the process. Firefox then waits for the response. If a response is not received within a given amount of time (by default, this is 45 seconds), the plugin is assumed to have locked up, and Firefox terminates the plugin ...
https://developer.mozilla.org/en/Plugins/Out_of_process_plugins/The_plugin_hang_detector


If you run FireFox in "safe mode" (which has no addons) and there is an improvement then you know an addon is probably the cause of your delayed shutdown, (and you can find out which one by a process of elimination).   
« Last Edit: 19/06/2012 05:03:19 by RD »
 

Offline confusious says

  • Jr. Member
  • **
  • Posts: 38
    • View Profile
I found when I had firefox it slowed everything down, so I removed it, I cannot think of any other answer.
 

Offline SeanB

  • Neilep Level Member
  • ******
  • Posts: 1118
  • Thanked: 3 times
    • View Profile
Yes, addons and multiple tabs are memory hogs. Most common though is that (in)famous flash extension, which hogs memory and crashes every so often. Currently my version is using 1.1G of memory and is not sluggish, though it will fall over eventually. Still the biggest CPU user at 23% currently. If it dies or gets too slow I kill it and restart it and restore the tabs, generally it only does this after an addon updates and i miss the little window that flashes up.

If you want something else use Google Chromium, it is fast and lightweight, plus it comes with it's own flash player built in and not the Adobe bloatware.
 

Offline CliffordK

  • Neilep Level Member
  • ******
  • Posts: 6321
  • Thanked: 3 times
  • Site Moderator
    • View Profile
I do like the tabbed browsing.  And, like you, periodically I just kill firefox, expecting it bring up the crash manager, at which point I can either start fresh, or select the windows that I want to preserve.

I suppose my question is why I should go through the normal shutdown in firefox, that sometimes pops up with messages saying that your window may be frozen, and can  take several minutes to shut down when I can just kill it which shuts it down very rapidly.   

I certainly don't need firefox to communicate with many websites giving them status updates on shutdown.

I guess the same things happens with some devices too.  I have a printer/fax multifunction machine that if you use the proper shutdown, it takes about a minute.  For the printer, I would rather it power on/off with a clean slate.  I suppose I don't use the fax features much which may be different, but it should only take the printer 1/2 second to determine that there is nothing in the fax in/out queue.
 

Offline RD

  • Neilep Level Member
  • ******
  • Posts: 8128
  • Thanked: 53 times
    • View Profile
... Currently my version is using 1.1G of memory ...

Have you tried clearing the FireFox cache to reduce this large use of memory ?

http://support.mozilla.org/en-US/kb/how-clear-firefox-cache

If you don't clear the cache the data it stores, (copies of all the web-pages you've seen since the cache was last cleared), will eventually become unfeasibly large.

... Still the biggest CPU user at 23% currently

Once FireFox has loaded the page(s) you want to see it should use less than 1% CPU ...



Again my suggestion is to try running FireFox in Safe-Mode , if it performs much better in safe-mode then you know one of your addons is a problem, (e.g. out-of-date or competing for resources )
« Last Edit: 16/05/2013 20:26:23 by RD »
 

Offline SeanB

  • Neilep Level Member
  • ******
  • Posts: 1118
  • Thanked: 3 times
    • View Profile
I know what causes this, it is always related to addons, but I leave it running for weeks at a time before the end. CPU is always going to be flash, you need it but it uses so much CPU when running. I use Chromium ( not Chrome....) and it always works but the addons I use are not there yet. IE I use in a virtual machine if absolutely necessary if useragent does not convince the remote site that I am not a IE client, and it wants to run Activex that are always dodgy, that VM gets scrubbed after session end and replaced by a backup image.
 

Offline wolfekeeper

  • Neilep Level Member
  • ******
  • Posts: 1092
  • Thanked: 11 times
    • View Profile
Every once in a while, I find Firefox is using far too much memory, perhaps due to my bad habit of opening multiple windows, and using lots of tabs. 

Should one use the "normal" shutdown?  Or just use the task manager and kill the process?
Wherever possible use the normal shutdown/exit.

If firefox was writing to a file and you kill the process it may leave the file partially written. That's less likely using the normal shutdown (but sometimes there's no choice). Also if Windows asks if you want to force it to exit; avoid forcing it if possible.
Quote
Why does it sometimes take forever to close a window?
It varies.

Sometimes the computer is just very busy, or if you have slightly insufficient RAM, and particularly if you haven't used that tab for a while, then the computer will have swapped the memory for that window out to disk, and then it will have to load it back in in order to close it properly. This can take a considerable time.
Quote
Do websites have a "phone-home" portion?  WHY?
Some may do, but not usually.
Quote
I realize that applications such as Wordprocessors or Spreadsheets will have a "saved file" check on closing.  But, for most other applications, I would just like it to quit immediately when closing. 

The memory manager should be able to deal with memory.  Is the problem dealing with temporary files?  Is there a better way to deal with temporary files, perhaps using a garbage collection routine like memory?
Having lots and lots of RAM usually speeds things up; up to a point. The OS will use the RAM as a disk cache and things will go faster.

With Firefox often a plugin will crash or run very slowly or use excessive amounts of RAM, if you kill the plugin containers from the task browser often Firefox will pop back into life immediately, but your videos and audio and Java will all crash.
« Last Edit: 18/05/2013 17:53:56 by wolfekeeper »
 

Offline nicephotog

  • Sr. Member
  • ****
  • Posts: 387
  • Thanked: 7 times
  • H h H h H h H h H h
    • View Profile
    • Freeware Downloads
Using the task manager is just a GUI interface to do what you would from a commandline command to "shutdown" or "stop" or "start" a process handle for the platform software OS to join to the application running or stopping.

In effect it is the same command issued when you press that X button on the GUI window. Effectively for most DLL "services" that have no GUI the only way of starting or stopping them is with those commands on the "administration console" on the start menu.

In UNIX they use a command "kill" and a number to terminate a process or a sub process.

In a context of winow shutdown time, browsers have HTML and Javascript pages and one of the most common actions is for page programming to call wait to the browser before closing if javascript has an "onclose" or "onunload" event binding to a page window element, it simply means it must complete some clean up task with the javascript before continueing.
« Last Edit: 22/05/2013 05:10:02 by nicephotog »
 

Offline yor_on

  • Naked Science Forum GOD!
  • *******
  • Posts: 11978
  • Thanked: 4 times
  • (Ah, yes:) *a table is always good to hide under*
    • View Profile
Use Firefox Clifford, I still think it's the best choice from security aspects, you picking good add-ons naturally. Reminds me of the way Windows was once, in the beginning. And there are 'clones' of firefox, like Pale Moon, that's particularly designed to give you some added security. In that one you also have a tab saying (in 'Tools' 'Options') "don't load tabs until selected" meaning that you only get the tabs you are on loaded, you can also get addons for pre-fetching etc.

If you ask a security specialist what the biggest hole is for you up on the Internet, he will, if he's any good and honest, tell you that it is your browser. So a good browser, appropriate add ons, no back doors, a-virus and a firewall ..
 

The Naked Scientists Forum


 

SMF 2.0.10 | SMF © 2015, Simple Machines
SMFAds for Free Forums