Uploaded image for project: 'Qt Creator'
  1. Qt Creator
  2. QTCREATORBUG-25831

qt freezes for 10+ seconds when opening context menu over c++ object

XMLWordPrintable

      i came across a bottleneck when working on msgpack_cpp adapters for custom types: msgpack_cpp allows the creation of adaptors for custom types by template specialization of a `convert<>` struct, something like:

      #include <msgpack.hpp>
      namespace msgpack {
      MSGPACK_API_VERSION_NAMESPACE(MSGPACK_DEFAULT_API_NS) {
      namespace adaptor {
      
      struct my_type
      {};
      
      template<>
      struct convert<my_type>
      {
          msgpack::object const& operator()(msgpack::object const& object, my_type& value) const;
      };
      
      }
      

      when opening the context menu (right-click) on `operator()`, the context menu opens immediately, but qtc freezes for 10+ seconds (in my real-world codebase). most of the cpu time seems to be spent inside `CPlusPlus::ClassOrNamespace::lookupType_helper`.

      msgpack_cpp brings a lot of built-in adaptors (specialisations of convert<>). so i wonder if this will cause any performance bottleneck, which can be worked around in one way or another.

      https://github.com/msgpack/msgpack-c/wiki/v2_0_cpp_adaptor
      https://github.com/msgpack/msgpack-c/tree/cpp_master/include/msgpack/adaptor

        No reviews matched the request. Check your Options in the drop-down menu of this sections header.

            kandeler Christian Kandeler
            timblechmann tim blechmann
            Votes:
            1 Vote for this issue
            Watchers:
            5 Start watching this issue

              Created:
              Updated:
              Resolved:

                There are no open Gerrit changes