Welcome to the Treehouse Community

Want to collaborate on code errors? Have bugs you need feedback on? Looking for an extra set of eyes on your latest project? Get support with fellow developers, designers, and programmers of all backgrounds and skill levels here with the Treehouse Community! While you're at it, check out some resources Treehouse students have shared here.

Looking to learn something new?

Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and join thousands of Treehouse students and alumni in the community today.

Start your free trial

General Discussion

Battery life on laptop drastically reduced with TeamTreeHouse???

I just got a refurbished 2014 13" MBP Retina (2.8 GHz Intel Core i5, 8gb ram, 512gb SSD) and I've pretty much only been using it while learning with TeamTreeHouse. My concern is that the battery is supposed to last for up to 10hrs or so and I've been getting max 4hrs or so. I'd like to know if this is common while using a video-based site like tth. If it seems extreme however, I'd like to know so I can talk to Apple about it.

Thank you for your input!!

(Also, I am doing a battery calibration today and will test the results afterwards and will spend a few hours using the computer without any video to check the differences.)

5 Answers

Both wi-fi and video playback do use more processing power than regular activities. This can of course depend on your laptop's power and graphics settings, too.

If you purchased your MacBook refurbished, the battery may still not be brand-new, and thus, it may not hold a charge for as long as a new one would.

MacBook batteries are warranted for 1000 "charge cycles" - that is to say, full recharge and depletion cycles. You can see the number of cycles your current battery has used to date by going to the Apple menu and selecting:

 -> About This Mac -> More Info...

In the window that pops up, select System Report.

In the left-hand column, under Hardware, select Power. You will then see info on your laptop's battery, including serial number, charge status, and cycle count.

If you've got over 1000 cycles charged, I would look into getting the battery replaced. I had to do this recently on my 2011 MacBook Air that was out of warranty, and it didn't cost very much. If yours is still under the refurbished warranty, it may be covered, check your paperwork for details.

Now, in regards to power and graphics, the MBP Retina actually has two graphics chips - a high-powered Intel Iris discrete graphics chip, and a "low power" integrated graphics circuit. Using the high-powered chip gives you better graphics and video playback performance (particularly for 3D games and HD video).

There is an option under Energy Saver which allows you to select whether the Mac automatically switches to the low-power graphics mode. If this is turned off, it automatically uses the high-powered graphics chip. Try turning it back on and see if this makes a difference.

Finally, your distance to your wi-fi router may also be a factor. When it's further away, your Mac's wi-fi card will automatically adjust and amplify signals going in and out in an effort to boost signal gain, and this also uses up more power. If you can, try moving closer to your wi-fi router, or try using a wired connection (Ethernet cable).

Your wi-fi connection type and environment can also affect this. If you live in an area with lots of wi-fi interference (neighbours with base stations etc), your laptop + router basically have to "shout" to be heard. If you have a more modern one, try selecting a different frequency band or mode (2.4 vs 5GHz), or try to find a wi-fi channel that isn't being used by other people.

There are helpful apps for smartphones that can help you determine wi-fi signal strength, and there are also apps that can analyze the wi-fi spectrum around you to determine where you can find the least channel interference

Hi A.J., Thanks for your input. It's greatly appreciated. I can't seem to figure out what kind of graphics card(s) I have. And, I don't have the option to turn off any graphics card under Energy Saver... Do you know where else it may be. I can't find it!

I checked the battery cycles, and as I was led to believe, it seems that Apple sends out their refurbished machines with all new bodies and batteries. Mine has 14 cycles.

It seems the culprit was actually Chrome. I found in a forum somewhere that someone discovered Chrome was killing their battery and my switching to Chrome from Safari did seem to coincide with some very odd behavior from my MBP.

I'm going to try to include a picture of the Energy tab in the Activity Monitor here. It shows Chrome's average "energy impact" to be 144.89, while Safari's is a mere 1.01 !!!!

The moral of the story: DON'T USE CHROME

I have the same mac retina laptop as you (2012 version I think tho), and mine does the same thing. Whenever I watch a Treehouse video, I can hear the fans kick in (usually dead silent) and it gets roasting hot. Never happens with video on any other website - just treehouse.

PS. Funnily enough, Treehouse is the only one of the few websites I use Chrome for!

Yes, at the moment, Chrome does use more energy than Safari. The battery icon, when clicked, will open a menu showing which apps are significant energy users, and i://t was usually one of the worst culprits. (I do like its implementation of dev tools better than Safari's, though, and Firefox is doing some nice stuff with Animation tools, so no one browser is best at everything.)

Safari also takes advantage of new technologies in OS X Mavericks and higher that reduce CPU and energy usage: App Nap, memory compression, and Timer Coalescing. This latter feature gangs up instructions for execution all at once, keeping the CPU active, rather than using energy to constantly power-up and power-down (imagine how short light bulb life would be if you flicked it on and off several times a minute).

Apps have to be rewritten and recompiled to take advantage of these features; I'm not sure Chrome has been updated for this yet. I know from reading the Chromium open-source issue logs, this is something they were looking at around this time last year, but it's not something you can fix by flipping a switch.

Regarding which graphics chip is in use at any one time, you can tell by following the instructions in this Apple support article: https://support.apple.com/en-sg/HT202053

Specifically regarding video playback, Treehouse uses the native HTML5 <video> element wrapping an .mp4, so there's no intermediate plugin like Flash or Silverlight generating extra cycles; this should be rendered natively by the browser, using the GPU for decoding.

That said, some hardware/software combinations don't allow Chrome (or any browser, actually) to use the GPU for this.

If you type chrome://gpu in the URL bar, this will give you a report on what is active and what isn't.

For instance, on my MacBook Air, which only has integrated Intel HD 3000 graphics and not a separate GPU, it reports that video decoding is "software only, hardware acceleration is unavailable." Therefore it's really the CPU that's doing the bulk of the work to decode streaming video, where a GPU would be much more efficient.

I am using the new surface pro, and I have caught the same issue. The video will drain more cpu than regular videos.

i have the same problem with a MacBook Pro 2018 :*(