News Archive (1999-2012) | 2013-current at LinuxGizmos | Current Tech News Portal |    About   

Qt 4.8 tackles threading and performance issues

Dec 15, 2011 — by Eric Brown — from the LinuxDevices Archive — 17 views

The newly independent Qt Project announced a new release of its Linux-ready cross-platform development framework. Qt 4.8 adds Qt Platform Abstraction for easier porting of Qt to different windowing systems, threaded OpenGL support, multithreaded HTTP, optimized file system access, and a browser update to QtWebKit 2.2.1, says the project.

Less than two months after Nokia made its Qt business unit an independently governed open source project, the latest release of its Qt development framework is ready to roll.

Qt suffered a setback when Nokia back-burnered the Qt-based MeeGo operating system in favor of Windows 7 earlier this year. Then in September, Intel stepped back from MeeGo to instead launch — along with Samsung and the Linux Foundation — a new Tizen OS project built on HTML5 as well as MeeGo and LiMo code, but apparently without the Qt foundation.

Yet, the cross-platform Qt has a far broader reach than the floundering MeeGo, and its partial spin-off as an independent project may give it more flexibility in its development. Nokia is continuing to sponsor it — although at arm's length — and may even feature it in a rumored, upcoming "Meltimi" OS for feature phones. (For more background on Qt, see our earlier spin-off coverage.)

Qt 4.8 does not appear to be as major a release as last year's Qt 4.7, which added building blocks for a new high-level animation- and touch-enabled "Qt Quick" UI stack, including a Javascript-based QML (Qt Meta-Object-Language) and "Qt Declarative" C++ module. Qt Quick came to fruition in March of this year, as part of a 4.7.2 upgrade to Qt.

In version 4.8, Qt Quick has been upgraded to version 1.1, offering better performance. Qt Quick 1.1 also adds new properties such as pinch gesture handling.

QPA streamlines Qt porting to different windowing systems

While the 4.7 releases expanded QT with higher level interfaces and tools, Qt 4.8 goes under the hood to tinker with fundamentals. The new Qt Platform Abstraction (QPA), for example, restructures the GUI stack to enable easier porting of Qt to various windowing systems and devices, says the Qt project. Specifically, QPA is said to provide a "clean" abstraction layer for porting QtGui to new window systems.

Formerly known as the Lighthouse project, QPA will play a more crucial role in Qt 5.0, due in 2012, by enabling a redesign of the graphics stack with a Qt Quick and QML Scenegraph foundation. The redesign will make graphics better optimized for particular graphics processing units (GPUs) to enable smoother graphics and animation via QML and Javascript, says the project.


In Qt 4.8, the Qpainter class can now run as an independent thread, optimizing performance for drawing features and effects.

(Click to enlarge)

Another graphics-related enhancement to Qt 4.8 is the addition of threaded OpenGL support. The threading feature lets users render OpenGL without interrupting main thread execution, "enabling those of us that are not OpenGL-ninjas to render OpenGL from more than one thread concurrently," says the project. Buffers swapping, texture uploading, and Qpainter threads are now said to be available (see image above).

Another thread-related improvement is said to be multithreaded HTTP, enabling HTTP requests to be handled in a separate thread by default. "This should make application GUIs smoother, as networking will no longer use the main event loop," says the project.

Even deeper under the hood, the file system stack is said to have been optimized for better I/O performance. Specifically, Qt now reduces the number of system calls performed for I/O, and makes better use of cached data.

Finally, the Qt version of the Webkit browser has been upgraded. QtWebKit 2.2.1 is said to improve performance and offer greater compiler compatibility. The Webkit browser will play a more central role in Qt 5 than it has done in the past, says the project.

Availability

Qt 4.8.0 is available now along with QtWebKit 2.2.1. The source and binary packages for Qt 4.8.0 on Linux, Windows, and Mac OS X, can be downloaded from the Qt Download Page. Source code is available under the terms of the GPLv3 and LGPLv2 licences, and a commercial license is also available.

An overview of new features may be found in this Qt 4.8 announcement, and more details may be found in the "What's New in Qt 4.8" page".


This article was originally published on LinuxDevices.com and has been donated to the open source community by QuinStreet Inc. Please visit LinuxToday.com for up-to-date news and articles about Linux and open source.



Comments are closed.