在https://qual-e.appspot.com用cobalt rc_11版本测试时,按键移动太慢(5s+),有时甚至根本无法移动焦点,很难用页面测试,检查后cpu使用率,MainWebModule使用了98%的CPU,请问有什么办法可以改善吗?
1> 移动焦点时MainWebModule的CPU使用率为98%
2> 移动焦点时的跟踪日志
3> UpdateComputedStylesAndLayoutBoxTree的调用回溯
[cobalt]> cobalt::layout::UpdateComputedStylesAndLayoutBoxTree() [0xcad0a0]
[cobalt]> cobalt::layout::LayoutManager::Impl::DoSynchronousLayout() [0xc919b4]
[cobalt]> cobalt::dom::Document::DoSynchronousLayout() [0x2c3fe8]
[cobalt]> cobalt::dom::HTMLElement::offset_width() [0x2ec704]
[cobalt]> cobalt::dom::(anonymous namespace)::get_offsetWidth() [0xecf80c]
[cobalt]> js::Invoke() [0xa55a60]
[cobalt]> js::Invoke() [0xa56348]
[cobalt]> js::InvokeGetter() [0xa564e0]
[cobalt]> js::BaseProxyHandler::get() [0x9ee84c]
[cobalt]> js::Proxy::get() [0x9f47f0]
[cobalt]> js::GetProperty() [0xa45c74]
[cobalt]> Interpret() [0xa4b578]
[cobalt]> js::RunScript() [0xa557c8]
[cobalt]> js::Invoke() [0xa55b24]
[cobalt]> js::Invoke() [0xa56348]
[cobalt]> JS::Call() [0x931614]
[cobalt]> cobalt::dom::MozjsEventListener::HandleEvent() [0xeb448c]
[cobalt]> cobalt::dom::EventListener::HandleEvent() [0x338e30]
[cobalt]> cobalt::dom::EventTarget::FireEventOnListeners() [0x2d7e40]
[cobalt]> cobalt::dom::Node::DispatchEvent() [0x3100fc]
[cobalt]> cobalt::dom::Window::InjectEvent() [0x322e80]
[cobalt]> cobalt::browser::WebModule::Impl::InjectInputEvent() [0x850ac]
[cobalt]> cobalt::browser::WebModule::Impl::InjectKeyboardEvent() [0x863d0]
[cobalt]> base::internal::Invoker<>::Run() [0x8db04]
[cobalt]> MessageLoop::RunTask() [0xc1e3c]
[cobalt]> MessageLoop::DeferOrRunPendingTask() [0xc2c50]
[cobalt]> MessageLoop::DoWork() [0xc3994]
[cobalt]> base::MessagePumpDefault::Run() [0xc8ca8]
[cobalt]> MessageLoop::RunInternal() [0xc4ca8]
[cobalt]> base::RunLoop::Run() [0xd9438]
[cobalt]> MessageLoop::Run() [0xc1708]
[cobalt]> base::Thread::ThreadMain() [0xf4df0]
[cobalt]> base::(anonymous namespace)::ThreadFunc() [0xf2984]
[cobalt]> (anonymous namespace)::ThreadFunc() [0x11525c]
4> Youtube 中的焦点移动回溯(相同的钴二进制文件,没有这个问题)
[cobalt]> cobalt::layout::UpdateComputedStylesAndLayoutBoxTree() [0xcad0a0]
[cobalt]> cobalt::layout::Layout() [0xcae0cc]
[cobalt]> cobalt::layout::LayoutManager::Impl::DoLayoutAndProduceRenderTree() [0xc929d4]
[cobalt]> base::Timer::RunScheduledTask() [0xf6b40]
[cobalt]> base::BaseTimerTaskInternal::Run() [0xf6f54]
[cobalt]> MessageLoop::RunTask() [0xc1e3c]
[cobalt]> MessageLoop::DeferOrRunPendingTask() [0xc2c50]
[cobalt]> MessageLoop::DoDelayedWork() [0xc2d80]
[cobalt]> base::MessagePumpDefault::Run() [0xc8ccc]
[cobalt]> MessageLoop::RunInternal() [0xc4ca8]
[cobalt]> base::RunLoop::Run() [0xd9438]
[cobalt]> MessageLoop::Run() [0xc1708]
[cobalt]> base::Thread::ThreadMain() [0xf4df0]
[cobalt]> base::(anonymous namespace)::ThreadFunc() [0xf2984]
[cobalt]> (anonymous namespace)::ThreadFunc() [0x11525c]
[cobalt]> <unknown> [0xb6612e84]
[cobalt]> <unknown> [0xb6612e84]