Submit Hint Search The Forums LinksStatsPollsHeadlinesRSS
14,000 hints and counting!

Reduce CPU usage in Camino during page loads Web Browsers
There is an issue with Camino that also is present in other web browsers, such as Internet Explorer and Mozilla: when requesting a page, the browser will take all available CPU time it can. This can be quite annoying for individuals like myself that do a lot of CGI scripting work (Lasso in my case), where developing a page requires constant reloading of a web page, only to have things slow down to a crawl because the web browser and web server on the same machine fighting for dominance.

The reason for the CPU usage is due to the status "barber pole" animating. Since it seems that this animation routine is built into OS X, the issue is not really an issue with Camino, but more with Mac OS X itself (you can see similar behavior in other applications which also use the barber pole animation).

To resolve the issue of CPU usage, all you have to do is remove the status bar from the BrowserWindow.nib file. This file is inside the Camino.app bundle (control-click on the app for the Show Package Contents pop-up), on the path Contents -> Resources -> English.lproj -> BrowserWindow.nib.

To edit this file, you will need to have the Developer Tools installed (or XCode if you are fortunate enough to have it). Once open, simply double click on the "Browser" icon in the BrowserWindow.nib window, and then select and delete the status barber pole widget.

Save, and restart Camino, and you should find it to be much quicker during page loads. This might also affect other areas of performance, such as browsing pages that contain Flash content.
    •    
  • Currently 2.60 / 5
  You rated: 1 / 5 (5 votes cast)
 
[11,867 views]  

Reduce CPU usage in Camino during page loads | 12 comments | Create New Account
Click here to return to the 'Reduce CPU usage in Camino during page loads' hint
The following comments are owned by whoever posted them. This site is not responsible for what they say.
Reduce CPU usage in Camino during page loads
Authored by: Scottie on Sep 23, '03 01:19:55PM

Can't locate a barber pole widget in the instances tab of browserwindow.nib. Does it have a different name or is it under a different tab?



[ Reply to This | # ]
Reduce CPU usage in Camino during page loads
Authored by: explosivo on Sep 23, '03 01:29:16PM

I never like to delete a control from a nib, so I just changed the Barber pole to a spinner by selecting the barber pole, opening the inspector, and setting its type from "Bar Style" to "Spinning Style". While no control will surely be less resource intensive, I think the spinner is much more efficient than the barber pole and I need not be worried about breaking compiled code.



[ Reply to This | # ]
Reduce CPU usage in Camino during page loads
Authored by: corefile on Sep 23, '03 07:38:50PM

I'll ask the dumb question. How do you change to spinner? I've tried several times. I'm not a mac person I don't know how to select the barber bar and use the Inspector, could you please explain for us "switchers"


-corefile



[ Reply to This | # ]
Reduce CPU usage in Camino during page loads
Authored by: calyphi on Sep 23, '03 10:27:36PM

Interface Builder

[Menu] Tools > Show Info



[ Reply to This | # ]
Reduce CPU usage in Camino during page loads
Authored by: johnsawyercjs on Jun 01, '04 08:41:51PM

What I'm sure calyphi meant to say, but didn't have enough time at the moment, was:

-- You need the utility "Interface Builder". To get this, install Apple's "Developer Tools", which comes with your OS X installer CDs. If you have the OS 10.3 installer CDs, the fourth disk will be the XCode Tools CD--run the installer that's on that CD. If you choose to install everything, it will require about 700 meg of free space.
-- After the Developer Tools are installed, go to the Finder and open the window where the Camino application is located. Duplicate it so you have an unmodified copy after this process, in case something goes wrong. Then hold down the Control key while you click and hold on the Camino application icon--this will bring up a contextual menu; from this menu, select "Show package contents". Camino will open up as a series of folders. While still in the Finder, open the file at this path: Camino/Contents/Resources/English.lproj/BrowserWindow.nib. When you double-click on the file "BrowserWindow.nib", it will open in Interface Builder, as a window by that name.
-- In this window, there will be an icon named "Browser". Double click on it, and it will open a window titled "Bookmark toolbar" (I don't know why this is the window's title). At the lower right corner of this window, you'll see the barber pole progress indicator. Click on it once to select it, then press the Delete key to get rid of it.
-- Close the window for "BrowserWindow.nib"; Interface Builder will ask if you want to save the changes. Let it.
-- Go to the Finder and launch this modified copy of Camino. You should no longer see a barber pole progress indicator.

I tried this, and it does seem to have noticeably sped up my Camino page loads, though I have a slower Mac, a B&W G3 at 400 mhz--people with faster Macs might not notice a difference. I tried to find a similar thing in Internet Explorer, since I use it often too, to save entire web pages in a single file, which Camino doesn't do, but couldn't find a progress bar--Explorer's structure is almost entirely different--its programmers don't appear to have used the same sort of program-building tools that the Camino people use (not a surprise).



[ Reply to This | # ]
Reduce CPU usage in Camino during page loads
Authored by: johnsawyercjs on Jun 02, '04 05:36:59AM

Oops, those were the instructions on how to do what the original hint was describing. To change the barber pole into a spinning indicator, follow the same instructions, but instead of deleting the barber pole after you click on it, go up to Interface Builder's "Tools" menu and select "Show Info". This will open a window which will contain a popup, from which you can change "Bar" to "Spinning".



[ Reply to This | # ]
Reduce CPU usage in Camino during page loads
Authored by: mrbiiggy on Sep 24, '03 02:04:30AM

Notice no difference, processor usage during page loads seems no different either.

It's all in your head.



[ Reply to This | # ]
Reduce CPU usage in Camino during page loads
Authored by: randalla on Sep 24, '03 03:11:28PM

Nope, it's not, watch top/process viewer and hit a page that is very slow to load (to give yourself time to see the effects). If you have the animation (barber pole) running, you will see Camino take over the processor. If you don't have it, Camino will idle around until the page comes back.

This may or may not be noticeable if you have a DP machine, where the barber will take one processor, and the other processor will just idle away doing whatever it wants. YMMV.



[ Reply to This | # ]
Reduce CPU usage in Camino during page loads
Authored by: mrbiiggy on Sep 24, '03 04:14:03PM
watch top/process viewer
How else do you think I would find out the processor usage? Must I make a movie of my `top -u` results to prove that I see absolutely no effect deleting this unnecessary pole?!

In the future don't treat me like I'm an idiot.

[ Reply to This | # ]
Reduce CPU usage in Camino during page loads
Authored by: randalla on Sep 25, '03 01:28:02PM

Sorry if you felt attacked. I can say that in my setup, it does do what I claim it does. There may be many reasons why your reacts differently than mine does. For example, the version of Camino, and OS X could play factors in it, as well as the setup of the machine in general.

I am on a single processor, PowerBook 12" G4 running 10.2.8 and am using not the most recent nightly (2003091202 to be exact). However, I have seen this issue in Camino for a long time, but I guess it might be possible that something has changed in the more recent nightlies, or that in the last full release (0.7) may not have had this issue.

As I stated, your mileage may vary (YMMV), and I only offered what I found useful, hoping that it might help someone who experiences the same type of thing.



[ Reply to This | # ]
Reduce CPU usage in Camino during page loads
Authored by: gatorparrots on Sep 24, '03 04:54:29PM
Actually, I don't see much processor usage until after the barber pole animation has completed and the page actually is drawn onscreen -- at that point the processors spike for a second, then return to normal usage levels.

[ Reply to This | # ]
Reduce CPU usage in Camino during page loads
Authored by: smigol on Oct 02, '03 04:46:19PM

I was able to try this hint out and it works just fine for me.

I do notice that there was a significant change in CPU loads while waiting for sites to return data.

I am running on 10.2.6 on 800 MHz G4 in PM 8600 w/1 G RAM.

I ran top -s 5 in the background to check CPU loads.

One caveat I found: I had to remove the backup nib file that was created before changes were seen in the camino app. Just removing it from the directory was enough to see the change.


From my old machine, Thanks!



[ Reply to This | # ]