简体   繁体   English

Qt5和X11严重的性能问题

[英]Serious performance problems with Qt5 and X11

We ported our application from Qt3 to Qt5. 我们将应用程序从Qt3移植到Qt5。 It runs smoothly under Windows but not under Linux (X11). 它在Windows下运行顺利但不在Linux(X11)下运行。 With Qt3 there is no problem with Windows or Linux. 使用Qt3,Windows或Linux没有问题。

Inside the application there is a canvas of about 1000x800 pixels. 在应用程序内部有一个大约1000x800像素的画布。 A simple vector graphic is drawn onto the canvas. 在画布上绘制一个简单的矢量图形。 The user clicks into the canvas, holding the mouse button pressed an moves the mouse. 用户点击进入画布,按住鼠标按钮移动鼠标。 Each mouse move results in a repaint. 每次鼠标移动都会导致重新绘制。

We registered the milliseconds in each stage: 我们在每个阶段注册了毫秒:

Start of MouseMove-event handling: 10581 MouseMove事件处理的开始:10581

call of update or repaint (makes no difference which one) 更新或重画的召唤(没有哪个区别)

Handling of resulting Paint-Event: 10583 处理结果油漆事件:10583

Painting finishes: 10584 绘画完成: 10584

return from update/repaint: 10687 (!) 从更新/重绘返回: 10687 (!)

I do not find any reason for this lag of 100ms (at each mouse move event!) 我没有找到任何100ms滞后的原因(每次鼠标移动事件!)

I need help! 我需要帮助!

In Qt4.8 the native graphics backend was deprecated. 在Qt4.8中,不推荐使用本机图形后端。 Remote X11 is no longer drawn with X11 calls but by painting onto a canvas and transmitting the result (a bitmap) to the client. 远程X11不再使用X11调用绘制,而是通过绘制到画布上并将结果(位图)传输到客户端。 This may result in larger bandwidth requirements and a slower when running X11 over network. 这可能会导致更大的带宽需求,并且在通过网络运行X11时会更慢。

See also this 另请参见

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM