Comments
-
Greg Hurrell
What preferences have you got set for Dock icon animation etc? These can suck quite a bit of CPU. I've done some optimization already to make them more efficient, but there is still more to be done in the future. The other thing which might use a bit of CPU is if you have iChat status line scrolling turned on, but in that case there's nothing really that I can optimise away.
The high CPU usage at launch is normal, because at that point Synergy Advance is parsing your iTunes music library file as fast as it can. Once it's finished parsing the usage should drop right off, as you observe.
If you have Dock icon animation turned on that would explain why the CPU usage goes up as soon as you start playing music. Even so, it shouldn't be too high. If you have animation turned on *and* cover art as a badge then the usage will go up because it not only has to animate the Dock icon but also composite the album cover as a badge over the top of it. Like I said, I've already done some optimization to minimize the amount of work Synergy Advance does, but there is still more that could be done. Basically, the code is already about as lean and efficient as it can get; most of the time is spent in Cocoa routines that I can't get inside of, so to get further optimizations I'll have to bypass Cocoa and do it some other way. This kind of thing might end up being a Tiger-only optimization, depending on what APIs I end up using.
-
Neil Sharp
I have only the following checked under the General preferences:
- Auto-launch Synergy Advance when iTunes is launched - Auto-quit Synergy Advance when iTunes quits - Check for new versions of Synergy Advance [Daily]
I do not have any of the other boxes checked, so animation or compositing should not be an issue.
I do use the iChat status feature, but not the scrolling feature. Here's what I have checked on the Instant Messaging preferences:
- Update iChat status based on current track - When iTunes track changes - When iTunes player state changes - Do not update when status is "Away" - Use Cover Art as user image - Custom format string: [%p: %a - %t] - Separator [--] - Limit status line length to [no limit]
I also turned on Hot Keys and assigned Command-F11, Command-F12, and Command-F13 to the old Synergy Classic settings (Previous song, Next song, and Play/Pause). The option for visual feedback for Hot Keys is also turned on.
I installed Growl 0.7.2 yesterday, and the CPU usage for Synergy Advance has not changed with respect to this new addition. It's still at ~12% after a night of iTunes being silent.
Hope that helps.
-
Greg Hurrell
Can you take a sample using the Activity Monitor application (in /Applications/Utilities/)? Select Synergy Advance from the list, double click it, and hit the "Sample" button. This will tell us, more or less, where Synergy Advance is spending its time.
-
Neil Sharp
Created an attachment (id=36) Screenshots of Inpect windows and samples in a ZIP file
The first sample (no screenshot, sorry) was taken during the first song played after Synergy Advance/iTunes startup. The second sample (and screenshot) was taken after about 10 songs had played and/or been skipped using the Command-F12 hotkey. The third sample (and screenshot) was taken after about 35 minutes of playing and/or skipping songs. The fourth sample (and screenshot) was taken immediately after playback was stopped in iTunes (after the approximate 35 minutes of playing before). The fifth sample (and screenshot) was taken about 45 minutes after playback was stopped -- iTunes remained idle during this time.
An aside -- one possible reason for the CPU time consumption when iChat status scrolling is turned on is the multitude of console logs it produces. This was the reason I turned that feature off and do not use it currently. I keep my console log up at all times (background in UNIX).
Hope that helps.
-
Greg Hurrell
What messages are being logged to the console?
-
Neil Sharp
These messages are created immediately after turning on the iChat status scrolling. It spits one out approximately every 1 second for as long as the status scrolling is activated.
2005-09-30 08:49:31.669 Synergy Advance[5599] -[WOIChatController updateScrollingText:] (/Users/ wincent/trabajo/Synergy/svn-files/SynergyAdvance/WOIChatController.m:117) 2005-09-30 08:49:32.579 Synergy Advance[5599] -[WOIChatController updateScrollingText:] (/Users/ wincent/trabajo/Synergy/svn-files/SynergyAdvance/WOIChatController.m:117) 2005-09-30 08:49:33.569 Synergy Advance[5599] -[WOIChatController updateScrollingText:] (/Users/ wincent/trabajo/Synergy/svn-files/SynergyAdvance/WOIChatController.m:117) 2005-09-30 08:49:34.569 Synergy Advance[5599] -[WOIChatController updateScrollingText:] (/Users/ wincent/trabajo/Synergy/svn-files/SynergyAdvance/WOIChatController.m:117) 2005-09-30 08:49:35.569 Synergy Advance[5599] -[WOIChatController updateScrollingText:] (/Users/ wincent/trabajo/Synergy/svn-files/SynergyAdvance/WOIChatController.m:117)
-
Greg Hurrell
Ah, ok. Those log statements shouldn't be in there. I'll get rid of them (or more precisely, I have already gotten ridden of them!). Even so, there is no way logging something to the console once per second would be responsible for heavy CPU usage.
I've taken a look at those samples you attached, and it appears that most of the time is being spent compositing something. Will take a look into it and try to figure out *what* is getting composited.
-
john
Created an attachment (id=37) Sample log
-
john
I've got a similar problem with Synergy Advance, except mine is getting up to nearly 50% CPU irregardless of weather or not iTunes is running. I am not using any of the iChat features and am running without a dock icon or menubar icon.
-
Greg Hurrell
Thanks for adding your comments, John. Your sample looks quite different from the one posted by Neil. Yours looks just like I would expect it to look when parsing the iTunes library file. Once the file is parsed the CPU should settle down again. Parsing should occur at launch only. If you have a slow computer (what are the specs on it, by the way?) and/or a very large iTunes library (how many tracks have you got in it?) then parsing will take longer.
-
john
12" pb, 1.5ghz G4, 512mb ram, and about 15,000 tracks in itunes, about 14,000 of which were on a afp mounted drive, removing all the remote files and leaving just the 500-1000 local files the cpu usage looks quite normal, actually 0% cpu right now, but before when all the remote files were in the library the cpu would not ever really settle down, just would occasionally drop to 20% or even as low as 15%, but would jump to 30-40% during any itunes/synergy interaction
-
Greg Hurrell
Interesting. Seems that the excess CPU usage you're seeing is a different issue than the one initially reported by Neil.
-
john
(In reply to comment #12)
Interesting. Seems that the excess CPU usage you're seeing is a different issue than the one initially reported by Neil.
oops, didn't mean to hijack someone else's ticket, should i file a new bug report for my issue?
-
Greg Hurrell
(In reply to comment #13)
oops, didn't mean to hijack someone else's ticket, should i file a new bug report for my issue?
Probably wouldn't be a bad idea, seeing as your issue seems to be very specifically related to network access to the tracks via AFP. It's more likely that the other issue initially reported by Neil will be easier to find and fix, so will get closed sooner; the AFP thing might be trickier.
-
john
Well, I had totally trashed my iTunes library and was in the midst of rebuilding it, first w/ only local files and taking samples, then adding in remote tunes and taking more samples when Apple released iTunes 6, so I figured I'd go ahead and upgrade and have not been able to reproduce the very high cpu usage; in fact I haven't seen thing over 10% for a prolonged period, with averages in the 5-8% range. I have no idea if this is just a coincedence of if iTunes 6 actually has something to do with it; so I am holding off on starting a new ticket just yet, but if it does reappear I will take more samples and start a new ticket then. (Or maybe you'll have enough info from the previous sample I submitted to fix this for a future release)
-
Greg Hurrell
Ok, we'll just keep an eye on it then and see how it goes. I am about to upgrade to iTunes 6 myself and check it out. If we need to we can always open another ticket later. Cheers, W.
-
Greg Hurrell
I'm going to roll this bug report into #288 seeing as in both cases the CPU usage seems to be related to compositing, although the samples don't look exactly the same. Should make it easier to keep track of all the related information in the one place.
- ** This bug has been marked as a duplicate of 288 ***
Add a comment
Comments are now closed for this issue.