Re: Optimising an app for battery power use?
Re: Optimising an app for battery power use?
- Subject: Re: Optimising an app for battery power use?
- From: Keith Blount <email@hidden>
- Date: Tue, 15 Mar 2005 06:16:06 -0800 (PST)
- Comment: DomainKeys? See http://antispam.yahoo.com/domainkeys
Many thanks for your reply - indeed, on checking my
settings I realise that on battery I am running at
"reduced" processing speed, although I didn't realise
this meant the speed was actually halved. (If I set it
to "highest", my program runs as fast as normal, but
obviously battery life is depleted.)
What is the best approach to this? To provide some
scaling down options in my app, or to include a
warning in the documentation? The slowdown when on
battery power is only really noticable if the user is
typing at a speed of over around 100wpm (at a rough
estimate), which won't be many users (though I am
aiming at writers, so my users' typing speed will be
above average), and even then it's not grindingly
slow. I have tracked down the area of code that's
causing this, but I doubt I'll be able to optimise it
enough so that it whizzes along on 500Mhz processing
power as nippily as it does on 1Ghz.
Thanks again, much appreciated,
Keith
--- Frederick Cheung <email@hidden> wrote:
>
> On 15 Mar 2005, at 09:44, Keith Blount wrote:
>
> > Hello,
> >
> > In my program I have a text view and I am doing a
> lot
> > of things in the -textDidChange delegate method
> > (updating a lot of other elements that need to
> reflect
> > the changes, including a number of calls to the
> layout
> > manager to calculate the position of characters
> and
> > setting the frames of a number of subviews in
> another
> > view). I have worked hard on this, so that speed
> is
> > not an issue.
> >
> > However, today I started testing the app on my
> iBook
> > G4 1Ghz on battery power, and it is notably slower
> > than when run on mains power. This is especially
> > notable after I run a large while loop (eg. I have
> > implemented a bullet points method, which loops
> > through the selected text looking for new lines
> and
> > adds a bullet to the beginning of each line -
> after
> > running this loop on battery power for a large
> amount
> > of text, my textDidChange method seems even
> slower,
> > which seems strange to me).
> >
> > Are there any general rules for optimising an
> > application so that it runs smoothly on battery
> power?
> > Or just anything that I can do to ensure there is
> not
> > a noticable difference between running on battery
> and
> > on mains?
> >
> It is not unusual for an application to run slower
> when on battery
> power since the CPU's frequency is decreased
> (according to the
> technote, the 1Ghz ibook will slow down to 500Mhz)
> and in machines with
> an L3 cache, this may be turned off).
>
> Fred
>
>
__________________________________________________
Do You Yahoo!?
Tired of spam? Yahoo! Mail has the best spam protection around
http://mail.yahoo.com
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Cocoa-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden