id,summary,reporter,owner,description,type,status,priority,milestone,component,version,severity,resolution,keywords,cc,mlocked 968,"Remove harmful ""optimization"" from AFD::HandleGopStart",bolek-mythtv@…,Isaac Richards,"The following code in AvFormatDecoder::HandleGopStart: {{{ // Grow positionMap vector several entries at a time if (m_positionMap.capacity() == m_positionMap.size()) m_positionMap.reserve(m_positionMap.size() + 60); PosMapEntry entry = {prevgoppos / keyframedist, prevgoppos, startpos}; m_positionMap.push_back(entry); }}} forces the position map to grow by 60 elements whenever it is full. This is not only not neccessary since QValueVector does the right thing already, but it is actually harmful since it introduces quadratic behavior. QValueVector by itself uses the exponential growth algorithm which preserves the linear behavior. A patch that removes this code is attached. ",patch,closed,minor,unknown,mythtv,head,low,fixed,,,0