Uploaded image for project: 'Qt'
  1. Qt
  2. QTBUG-132733

Clean up and move qtlocation's QCache3Q to QtCore

    XMLWordPrintable

Details

    Description

      The epic's descriptions states

      • A value-based QCache that doesn't need the cached items allocated on the heap (special usecase: QCache that holds items as shared_ptr so items aren't killed from under users; this would work with a value-based cache container, but it doesn't (without double indirection) using the current pointer-based QCache)

      Turns out QtLocation has a QCache3Q, which, while not value-based, at least uses shared_ptr (currently QSharedPointer, would have to be ported).

      Some "obvious" improvements would have to be done, first:

      1. port from QSharedPointer to std::shared_ptr
      2. Extract Base Class QCache3Q<Key>, holding the value as shared_ptr<void>
        1. Check whether a BaseBase can be extracted that doesn't depend on any template parameters and could be out-of-line'd
      3. Analyse the behaviour to check that the port from Q5Hash (= std::unordered_map) to Q6Hash did break performance characteristics
        1. Even so, consider using std::unordered_map, because QCache3Q is non-copyable, and node_handle would allow to potentially hold Node by value, avoiding the indirection though Node*.

      Attachments

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

        Activity

          People

            paangele Paolo Angelelli
            mmutz Marc Mutz
            Vladimir Minenko Vladimir Minenko
            Alex Blasche Alex Blasche
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:

              Gerrit Reviews

                There are no open Gerrit changes