使用带有钴rc_11版本的https://qual-e.appspot.com进行测试时,键移动太慢(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&gt;焦点在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]
答案 0 :(得分:0)
修正为Cobalt 11.78008 https://cobalt.googlesource.com/cobalt/+/810d1764791f7924402f1686ea98ed36ff8b36cb
这是由Qual-E焦点管理器逻辑和Cobalt布局管理器逻辑混合引起的。我们通过解耦布局框树和生成渲染树来增强布局管理器逻辑。