Skip to content
  • Milian Wolff's avatar
    Use the proper source model for the SystemTray unread count. · 9e9ce4f3
    Milian Wolff authored
    This used to iterate over mails as well (i.e. all contents of the
    ETM), which is pretty useless _and_ slow. I detected this with
    heaptrack, as it triggered hundred thousands of temporary allocations
    of invalid Collections and those in turn allocated CachePolicies.
    Turned out, the model did not check whether it can convert the source
    data to a Collection, but just blindly converted it. Thus, a default
    constructed Collection was returned for non-collection items. Which
    is slow.
    
    Now, we just iterate over the collection model, which will always
    return valid Collections for us - much better!
    
    REVIEW: 121403
    9e9ce4f3