id,summary,reporter,owner,description,type,status,milestone,component,version,severity,resolution,keywords,cc 9480,make_permissions slower then it needs to be,Adrian Dorr ,Beman Dawes,"in libs\filesystem\src\operations.cpp the make_permissions calls path::extension four times, which accounts for pretty much 100% of the cpu cycles outside the OS call of the directory iterators increment function. A better approach would be to get the extension string once and reuse it four times. Even better would be to find the last '.' in the filename and avoid the extra std::string construction. perms make_permissions(const path& p, DWORD attr) { perms prms = fs::owner_read | fs::group_read | fs::others_read; if ((attr & FILE_ATTRIBUTE_READONLY) == 0) prms |= fs::owner_write | fs::group_write | fs::others_write; std::string ext = p.extension().string(); if (BOOST_FILESYSTEM_STRICMP(ext.c_str(), "".exe"") == 0 || BOOST_FILESYSTEM_STRICMP(ext.c_str(), "".com"") == 0 || BOOST_FILESYSTEM_STRICMP(ext.c_str(), "".bat"") == 0 || BOOST_FILESYSTEM_STRICMP(ext.c_str(), "".cmd"") == 0) prms |= fs::owner_exe | fs::group_exe | fs::others_exe; return prms; } Or for extra performance (avoids construction of one std::string for the extension at the price of extra nasty code): perms make_permissions(const path& p, DWORD attr) { perms prms = fs::owner_read | fs::group_read | fs::others_read; if ((attr & FILE_ATTRIBUTE_READONLY) == 0) prms |= fs::owner_write | fs::group_write | fs::others_write; const std::string& path_str = p.string(); if (path_str.size() >= 4) { const char* ext = path_str.c_str() + path_str.size() - 4; if (BOOST_FILESYSTEM_STRICMP(ext, "".exe"") == 0 || BOOST_FILESYSTEM_STRICMP(ext, "".com"") == 0 || BOOST_FILESYSTEM_STRICMP(ext, "".bat"") == 0 || BOOST_FILESYSTEM_STRICMP(ext, "".cmd"") == 0) prms |= fs::owner_exe | fs::group_exe | fs::others_exe; } return prms; } ",Patches,new,To Be Determined,filesystem,Boost Development Trunk,Optimization,,filesystem make_permissions,a.dorr@…