Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. Qt Creator and other tools
  4. Slow code completion when working with cmake & large library
QtWS25 Last Chance

Slow code completion when working with cmake & large library

Scheduled Pinned Locked Moved Unsolved Qt Creator and other tools
slowcompletioncode
3 Posts 2 Posters 1.4k Views
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • V Offline
    V Offline
    victl
    wrote on last edited by victl
    #1

    Hi, everyone!
    I'm doing some work with PCL (Point Cloud Library) using Qt Creator.
    I choose to use CMakeLists.txt as the project file. But I found code completion in Qt Creator doesn't work well. It's terribly slow, about 15 - 20 seconds after I hit '.' or '->' did the code completion window pop up. This is very inconvenient as I rely on code completion very heavily. Can anyone point out where the problem is and what to do for me? Many thanks!

    here is my CMakeLists.txt file:

        project(cmake-pcl)
        cmake_minimum_required(VERSION 2.8)
        aux_source_directory(. SRC_LIST)
        find_package(PCL 1.7 REQUIRED)
        INCLUDE_DIRECTORIES(${PCL_INCLUDE_DIRS})
        LINK_DIRECTORIES(${PCL_LIBRARY_DIRS})
        add_definitions(${PCL_DEFINITIONS})
        add_executable(${PROJECT_NAME} ${SRC_LIST})
        target_link_libraries(${PROJECT_NAME} ${PCL_LIBRARIES})
    
    1 Reply Last reply
    0
    • V Offline
      V Offline
      victl
      wrote on last edited by victl
      #2

      [EDIT]
      I've tried to use qmake as the project manager. And I put this line in ".pro" file:

      INCLUDEPATH += /usr/local/include/pcl-1.8
      

      This time Qt Creator acts a little bit faster, but far from satisfactory - about 4 seconds.
      Don't know what's going on there. Since the Qt library itself is considerably large. And Qt Creator handles it very well.
      If I don't add that line of "INCLUDEPATH +=..." . Instead, by specifying the complete path relative to "/usr/local/include" (that is, adding such directives: "#include <pcl-1.8/pcl/io/pcd_id.h>" into source codes), the code completion functions real fast.

      1 Reply Last reply
      0
      • SGaistS Offline
        SGaistS Offline
        SGaist
        Lifetime Qt Champion
        wrote on last edited by
        #3

        Hi and welcome to devnet,

        I'd recommend bringing that matter to the Qt Creator team through the qt-creator mailing list(don't' forget to subscribed first) or #qt-creator IRC channel.

        Interested in AI ? www.idiap.ch
        Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

        1 Reply Last reply
        0

        • Login

        • Login or register to search.
        • First post
          Last post
        0
        • Categories
        • Recent
        • Tags
        • Popular
        • Users
        • Groups
        • Search
        • Get Qt Extensions
        • Unsolved