Skip to content

Slow dependency sorting #33

@ivanka2012

Description

@ivanka2012

PDBRipper/qwinpdb.cpp

Lines 2954 to 2987 in ea59ac5

while(!__bIsProcessStop)
{
bool bFound=false;
for(qint32 i=0;(i<nCount)&&(!__bIsProcessStop);i++)
{
for(qint32 j=i+1;(j<nCount)&&(!__bIsProcessStop);j++)
{
if( listSymbols.at(i).stTypeHashes.contains(listSymbols.at(j).nHash)&&
(listSymbols.at(i).nHash!=listSymbols.at(j).nHash)&& // The same name
(!listSymbols.at(j).stTypeHashes.contains(listSymbols.at(i).nHash))) // Circle
{
SYMBOL_RECORD symbolRecord=listSymbols.at(j);
listSymbols.removeAt(j);
listSymbols.insert(i,symbolRecord);
bFound=true;
break;
}
}
if(bFound)
{
break;
}
}
if(!bFound)
{
break;
}
}

Currently, sorting by dependency during a C++ header export is done by a bubble sort, which you can see linked above. WIth a decently sized PDB, this procedure is really, really slow.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions