News for hackers. Stuff that matters.
Re:The Arbitrary Logo by pavlov on Monday May 25, 2015 @03:48PM (#9601425)
Looks like the page is spending an inordinate amount of time converting pixel data into a data URL. That's probably the favicon update then?

To find out, I took a process sample with OS X Activity Monitor. The main thread is spending most of its time in a requestAnimationFrame() callback, and about 77% of the work done there is inside toDataURL() calls.

Here's the relevant bits of the sample:

    +                   !   : |     +   773 WebCore::DisplayRefreshMonitor::displayDidRefresh()  (in WebCore) + 347  [0x10e41ac6b]

    +                   !   : |     +   ! 772 WebCore::ScriptedAnimationController::serviceScriptedAnimations(double)  (in WebCore) + 407  [0x10e4309c7]

    +                   !   : |     +   ! : 771 WebCore::JSRequestAnimationFrameCallback::handleEvent(double)  (in WebCore) + 240  [0x10e430dd0]

    +                   !   : |     +   ! : | 770 WebCore::JSCallbackData::invokeCallback(JSC::JSValue, JSC::MarkedArgumentBuffer&, bool*)  (in WebCore) + 598  [0x10e431146]

    +                   !   : |     +   ! : | + 770 JSC::call(JSC::ExecState*, JSC::JSValue, JSC::CallType, JSC::CallData const&, JSC::JSValue, JSC::ArgList const&, JSC::JSValue*)  (in JavaScriptCore) + 63  [0x10dcefbaf]

    +                   !   : |     +   ! : | +   770 JSC::Interpreter::executeCall(JSC::ExecState*, JSC::JSObject*, JSC::CallType, JSC::CallData const&, JSC::JSValue, JSC::ArgList const&)  (in JavaScriptCore) + 462  [0x10db1a0ce]

    +                   !   : |     +   ! : | +     770 JSC::JITCode::execute(JSC::VM*, JSC::ProtoCallFrame*)  (in JavaScriptCore) + 35  [0x10de565f3]

    +                   !   : |     +   ! : | +       770 callToJavaScript  (in JavaScriptCore) + 311  [0x10ded24a1]

    +                   !   : |     +   ! : | +         601 ???  (in <unknown binary>)  [0x4ab59b07e64d]

    +                   !   : |     +   ! : | +         ! 597 ???  (in <unknown binary>)  [0x4ab59b170afb]

    +                   !   : |     +   ! : | +         ! : 597 ???  (in <unknown binary>)  [0x4ab59b001034]

    +                   !   : |     +   ! : | +         ! :   597 WebCore::JSHTMLCanvasElement::toDataURL(JSC::ExecState*)  (in WebCore) + 180  [0x10e45a854]
An easy fix would be to throttle the favicon update down to a lower frame rate -- it doesn't need to be updated on every requestAnimationFrame() call.
Re:The Arbitrary Logo by TD-Linux on Monday May 25, 2015 @10:38PM (#9602688)
The animated Favicon doesn't seem to work on Firefox at all.

Also, CPU usage is also high with firefox, and according to the profile, over half of it is spent in GC.

Re:The Arbitrary Logo by hobarrera on Saturday May 30, 2015 @04:45PM (#9631690)
Fun fact: If you open the logo on firefox, it'll show the shirked logo as a favicon: http://blog.arbitrary.io/content/images/2014/Mar/arbitrary_l...

It's a shame that gif favicons never made it back in the day. :(

Re:The Arbitrary Logo by zxcvcxz on Monday May 25, 2015 @08:52PM (#9602385)
Or they could just make it into a gif...
Re:The Arbitrary Logo by oh_sigh on Tuesday May 26, 2015 @12:19AM (#9602917)
I think the problem is you can't control which frame is displayed at a given moment to keep it in sync with the page animation. It seems like there is only a finite amount of possibilities for the icon, so perhaps they should just cache the data URLs each time around and load them directly from memory, instead of drawing them, getting data url info, then setting it.