Skip to content

cache promote plugin takes too much calculating size of LRUList #1336

Description

@vmamidi

pstack shows that cache promote plugin spends lot of time calculating too much time in determining the size of LRUList

#0 std::__distance<std::_List_const_iterator<std::pair<LRUHash, unsigned int> > > (__last=..., __first=...) at /opt/gcc/include/c++/4.9.3/bits/stl_iterator_base_funcs.h:83
#1 std::distance<std::_List_const_iterator<std::pair<LRUHash, unsigned int> > > (__last=..., __first=...) at /opt/gcc/include/c++/4.9.3/bits/stl_iterator_base_funcs.h:118
#2 std::list<std::pair<LRUHash, unsigned int>, std::allocator<std::pair<LRUHash, unsigned int> > >::size (this=0x2b37fe095c58) at /opt/gcc/include/c++/4.9.3/bits/stl_list.h:887

using a length variable should make it not dependent on stl list implementation

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions