• Vladislav Vaintroub's avatar
    MDEV-32228 speedup opening tablespaces on Windows · 1ee0d09a
    Vladislav Vaintroub authored
    is_file_on_ssd() is more expensive than it should be.
    It caches the results by volume name, but still calls GetVolumePathName()
    every time, which, as procmon shows, opens multiple directories in
    filesystem hierarchy (db directory, datadir, and all ancestors)
    
    The fix is to cache SSD status by volume serial ID, which is cheap to
    retrieve with GetFileInformationByHandleEx()
    1ee0d09a
os0file.cc 179 KB