Closed Bug 892023 Opened 11 years ago Closed 11 years ago

Lower Firefox battery drain

Categories

(Firefox :: General, defect)

x86
macOS
defect
Not set
normal

Tracking

()

RESOLVED DUPLICATE of bug 948528

People

(Reporter: zbraniecki, Assigned: rvitillo)

Details

(Whiteboard: [battery])

Machine: Macbook Air 2013 11", 8GB, 1.7 Haswell, 50% brightness

I used iStat Menu and macos battery estimator

No app launched:
  - Discrete Battery Amperage: 390 mA
  - Battery life estimation: ~14h

Safari:
  - Discrete Battery Amperage: 390 mA
  - Battery life estimation: ~14h

Chrome:
  - Discrete Battery Amperage: 410 mA
  - Battery life estimation: ~13h

Firefox Nightly (clean profile):
  - Discrete Battery Amperage: 590 mA
  - Battery life estimation: ~9h

Steps to reproduce:

1) Install iStat Menu
2) Turn on Sensors for CPU amperage
3) Dim screen to 50%
4) wait 1 minute
5) Look at the battery estimations and amperage
6) Launch browser
7) wait 1 minute
8) Look at the battery estimations and amperage
Whiteboard: [battery]
I will get a similar system and take a look at this to see if I can replicate.

Thanks for the report!
I have been able to verify this on a similar system. I grabbed some data with DTrace collecting stacks on cpu wakeups. By far, the most common stack was:

              libsystem_kernel.dylib`mach_msg_trap+0xa
              CoreFoundation`CFRunLoopWakeUp+0xaa
              XUL`nsAppShell::ScheduleNativeEventCallback()+0x3c
              XUL`non-virtual thunk to nsBaseAppShell::OnDispatchedEvent(nsIThreadInternal*)+0x26
              XUL`nsThread::PutEvent(nsIRunnable*)+0x80
              XUL`non-virtual thunk to nsInputStreamReadyEvent::OnInputStreamReady(nsIAsyncInputStream*)+0x22
              XUL`nsPipeEvents::~nsPipeEvents()+0x23
              XUL`nsPipe::AdvanceWriteCursor(unsigned int)+0xf8
              XUL`nsPipeOutputStream::WriteSegments(tag_nsresult (*)(nsIOutputStream*, void*, char*, unsigned int, unsigned int, unsigned int*), void*, unsigned int, unsigned int*)+0x3c
              XUL`nsHttpTransaction::WriteSegments(nsAHttpSegmentWriter*, unsigned int, unsigned int*)+0x4c
              XUL`nsHttpConnection::OnSocketReadable()+0x20f
              XUL`nsHttpConnection::OnInputStreamReady(nsIAsyncInputStream*)+0x56
              XUL`non-virtual thunk to nsHttpConnection::OnInputStreamReady(nsIAsyncInputStream*)+0xd
              XUL`nsSocketInputStream::OnSocketReady(tag_nsresult)+0x9e
              XUL`nsSocketTransport::OnSocketReady(PRFileDesc*, short)+0x127
              XUL`nsSocketTransportService::DoPollIteration(bool)+0x2b8
              XUL`nsSocketTransportService::Run()+0xf0
              XUL`non-virtual thunk to nsSocketTransportService::Run()+0xd
              XUL`nsThread::ProcessNextEvent(bool, bool*)+0x30d
              XUL`NS_ProcessNextEvent(nsIThread*, bool)+0xe8
Assignee: nobody → rvitillo
My configuration: OSX 10.9, Sandybridge CPU, FF Nightly (clean profile), about:blank

I couldn't reproduce the issue but I can confirm that there are some wakeups during idle generated by:
- WatchdogMain
- mozilla::net::CacheIOThread::ThreadFunc
- nsSocketTransportService::Poll
Blocks: 948528
No longer blocks: 948528
Status: NEW → RESOLVED
Closed: 11 years ago
Resolution: --- → DUPLICATE
You need to log in before you can comment on or make changes to this bug.