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

10.4: Improve the speed of the iTunes Dashboard widget System 10.4
Tiger only hintI really like the iTunes Dashboard widget, but if you have a lot of playlists (I have 150), it can take a long time to respond to any mouse clicks when you first pull up the Dashboard ... which makes it pretty ineffective as a quick alternative to using the iTunes interface.

This time lag occurs because the widget updates the list of playlists when you first show the widget, and when you turn it over. I'm not sure why you'd need to update the playlists when you first pull up the widget, so I decided to comment out that function. So far, I haven't noticed any problems (comments are welcome).

Here's how to change it:
  1. Go to the Widgets folder (/Library/Widgets) and locate the iTunes widget.

  2. Either make a backup of the iTunes widget and perform the following changes to the original "system owned" widget (which requires administrator privileges), or simply drag a copy of the iTunes widget to your ~/Library/Widgets folder as suggested in this hint. This will allow you to make changes to your own copy, without affecting the original. Your copy will override the iTunes system-wide widget.

  3. Control-click on the copy of the iTunes widget you plan to change, and select Show Package Contents.

  4. In the window that opens, find the file iTunes.js. Open this file in your favorite text editor.

  5. Find the following code (should be around line 280):
    function onshow ()
    {
       if (iTunes)
               iTunes.updateIsAppRunning();
      
          if (ourTimer == null)
     {
                 updateDisplay(); // reload we just shown
                  ourTimer = setInterval("updateDisplay()", 500);
           }
         if (running)
              updatePlaylists();
    }
    
  6. Comment out the last two lines in the onshow() function by starting each line with //, like this:
    function onshow ()
    {
     if (iTunes)
               iTunes.updateIsAppRunning();
      
          if (ourTimer == null)
     {
                 updateDisplay(); // reload we just shown
                  ourTimer = setInterval("updateDisplay()", 500);
           }
    //   if (running)
    //                updatePlaylists();
    }
    
  7. Save and close.

  8. Open the Dashboard and create a new instance of the iTunes widget to notice the changes.
[robg adds: I haven't tested this one...]
    •    
  • Currently 2.50 / 5
  • 1
  • 2
  • 3
  • 4
  • 5
  (2 votes cast)
 
[16,377 views]  

10.4: Improve the speed of the iTunes Dashboard widget | 8 comments | Create New Account
Click here to return to the '10.4: Improve the speed of the iTunes Dashboard widget' hint
The following comments are owned by whoever posted them. This site is not responsible for what they say.
10.4: Improve the speed of the iTunes Dashboard widget
Authored by: futures67 on Jul 07, '05 10:53:53AM

Seems to work for me. Great hint!



[ Reply to This | # ]
10.4: Improve the speed of the iTunes Dashboard widget
Authored by: MCDr on Jul 07, '05 11:40:37AM

Does this also fix the cpu load? On my Dual G5 2.5 GHz with 2GB RAM the iTunes widget uses more than 5% cpu constantly! Thats why i dont use it..

Thats why I use SizzlingKeys instead.
http://www.yellowmug.com/sk4it/



[ Reply to This | # ]
10.4: Improve the speed of the iTunes Dashboard widget
Authored by: futures67 on Jul 07, '05 12:09:30PM

Think the CPU load is the same. I'm running on an iBook G4 1.33GHz and 256mb of ram and the itunes widget uses around 8%, even now.



[ Reply to This | # ]
10.4: Improve the speed of the iTunes Dashboard widget
Authored by: leary on Jul 07, '05 12:17:47PM

That's odd... most of my widgets including iTunes drop to zero CPU use when I exit the dashboard. Wonder why yours are acting up like that.



[ Reply to This | # ]
10.4: Improve the speed of the iTunes Dashboard widget
Authored by: leary on Jul 07, '05 12:20:20PM

oops, just noticed that I can no longer pause with the modified version of the widget. Hitting the pause button restarts the playlist from the top.



[ Reply to This | # ]
10.4: Improve the speed of the iTunes Dashboard widget
Authored by: futures67 on Jul 07, '05 12:24:45PM

Strange... My pause works perfectly.



[ Reply to This | # ]
10.4: Improve the speed of the iTunes Dashboard widget
Authored by: plipps on Jul 07, '05 05:11:16PM

Wouldn't you want the widget to update it's list of playlists each time you started the widget up?

If you add or delete any playlists in iTunes, then the widget's list of playlists won't get updated unless you remember to manually go flip the widget over everytime you update your playlists.



[ Reply to This | # ]
10.4: Improve the speed of the iTunes Dashboard widget
Authored by: friedguy on Jul 07, '05 06:58:25PM

The pause function stopped working after I did this. It would stop for a half second then play again.



[ Reply to This | # ]