使用https://qual

编程入门 行业动态 更新时间:2024-10-26 10:40:11
使用https://qual-e.appspot.com进行测试时,密钥移动得太慢(The key moved too slow when test with https://qual-e.appspot.com)

当使用https://qual-e.appspot.com进行钴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]

When test with https://qual-e.appspot.com with cobalt rc_11 version, the key move too slow(5s+), sometimes the focus even can not move at all, it's hard to test with the page, after checking with the cpu usage, the MainWebModule used 98% CPU, so is there any way to improve it?

1> CPU usage of MainWebModule is 98% when move the focus

2> The trace log of when move the focus

3> the call backtrace of 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>focus move backtrace in Youtube(the same cobalt binary, no this issue)

[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]

最满意答案

这是固定在钴11.78008 https://cobalt.googlesource.com/cobalt/+/810d1764791f7924402f1686ea98ed36ff8b36cb

这是由Qual-E焦点管理器逻辑和Cobalt布局管理器逻辑的混合造成的。 我们通过解耦布局树和生成渲染树来增强布局管理器逻辑。

This is fixed at Cobalt 11.78008 https://cobalt.googlesource.com/cobalt/+/810d1764791f7924402f1686ea98ed36ff8b36cb

It was caused by the mixture of Qual-E focus manager logic and Cobalt layout manager logic. We enhanced the layout manager logic by decoupling laying out box tree and generating render tree.

更多推荐

本文发布于:2023-08-01 01:48:00,感谢您对本站的认可!
本文链接:https://www.elefans.com/category/jswz/34/1351442.html
版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。
本文标签:https   qual

发布评论

评论列表 (有 0 条评论)
草根站长

>www.elefans.com

编程频道|电子爱好者 - 技术资讯及电子产品介绍!