LXQt Performance Tips


As we’re going to have a new release for LXQt 0.9, I’d like to provide some performance tips for users and packagers.

  1. Consider compiling lxqt-panel and lxqt-runner with menu-cache  support whenever possible:
    Menu-cache is a mechanism to cache the generated freedesktop.org application menu so we don’t need to parse hundreds of files everytime. Though you can compile lxqt-panel and lxqt-runner without it and things still work, these two components will generally load faster if you use menu-cache.
  2. Compile libfm with libexif:
    Libfm if the core library of PCManFM file manager. When compiled with libexif support, it can extract the thumbnails created by the cameras which are often embedded in jpeg files. So we can avoid loading the photo and generate the thumbnail ourselves. With libexif, loading folders with many photos will be faster.
  3. Try to “prelink” your system:
    When you launch a program, your system will load it alone with the libraries it requires. Then, dynamic linking will be performed to make these libraries work together. The process could take seconds in some cases and affect the speed of program startup. By using “prelink”, part of the linking/relocation process can be done once and cached; then in the future the dynamic linking becomes faster. It’s tool worth trying if your desktop takes quite a long time to login.
  4. Avoid GTK+ theme:
    Qt developers did a great job and provided a “GTK+” style for theming the Qt programs so they can look like GTK+/Gnome programs when running in Gnome. The magic behind this is simple. Your Qt style engine loads GTK+  2 and creates fake Gtk UI elements. Then, copy the images painted by GTK+ to your Qt widgets. By using this, you have both Qt and GTK+ 2 theme engines loaded for every Qt program. Not really a big deal since the operations are still fast enough, but if you don’t need a GTK+ theme, don’t use it. Try “fusion” for Qt5 or “Cleanlook” for Qt 4.
  5. Some notes about gvfs:
    Removing gvfs won’t make your file manager faster. PCManFM-Qt does not use it for most of the local file operations. So it’s safe to keep it around since it does not slow down things.  We used “gvfs” from Gnome internally for trash can, volume management, and mounting various network filesystems. Yes, the UI is in Qt and its core uses few Gnome stuff. Don’t hate gvfs just because there’s a “g” in its name. It’s a quite good VFS implementation which does not have Gnome dependencies. So don’t remove it just because its name contains a “g”. It provides you some good features, including mounting sftp filesystems or accessing Android mtp devices if you have proper plugins installed.
    Generally speaking, it might be a good idea for packagers to add “gvfs” to the dependencies or package suggestion list of pcmanfm-qt.
  6. Avoid Qt 5.4.0 if possible:
    We encountered several weird regression bugs of Qt 5.4 while debugging LXQt. It breaks drag and drop crossing different programs. With Qt 5.4, you cannot drag a file from my file manager to other programs, but it’s not my fault.  🙂
    (The bug will be fixed in Qt 5.4.1, which is not yet released.)

We’re going to release LXQt 0.9 very soon!
Hope these tips help. Cheers!