Quantcast
Viewing all articles
Browse latest Browse all 40524

Very slow file listing with Visual Studio

Thanks DomAmato and silverbahamut.

The code:

float t0 = ofGetElapsedTimef();
fileList.open("mydir/");
cout << "open time " << ofGetElapsedTimef()-t0 << "\n";
t0 = ofGetElapsedTimef();
fileList.listDir();
cout << "list time " << ofGetElapsedTimef()-t0 << "\n";
cout << fileList.numFiles() << "\n";

Gives an "open time" of 0 seconds and a "list time" of 17 seconds for 1200 files.

As silverbahamut points it is related with some checking of the debug mode, in release mode I get an "open time" of 0 seconds and "list time" of 0.8 seconds for 1200 files.

I seems still a bit high to me (I am under a quite new PC with SSD disk) but much more reasonable.

Regards.


Viewing all articles
Browse latest Browse all 40524

Trending Articles