Uploaded image for project: 'Core ReactOS'
  1. Core ReactOS
  2. CORE-13681

Deleting large folder via explorer is extremely slow

    XMLWordPrintable

Details

    • Bug
    • Resolution: Fixed
    • Major
    • 0.4.7
    • Shell
    • None

    Description

      Example backtrace:

      00d7ed2c 7c933ba4 ntdll!RtlpFindAndCommitPages+0x14a [c:\ros\reactos\reactos\sdk\lib\rtl\heap.c @ 673]
      00d7ed88 7c932d00 ntdll!RtlpExtendHeap+0x84 [c:\ros\reactos\reactos\sdk\lib\rtl\heap.c @ 1097]
      00d7ee08 7c930767 ntdll!RtlpAllocateNonDedicated+0x190 [c:\ros\reactos\reactos\sdk\lib\rtl\heap.c @ 1841]
      00d7eed8 7c95012c ntdll!RtlAllocateHeap+0x307 [c:\ros\reactos\reactos\sdk\lib\rtl\heap.c @ 2040]
      00d7f188 7c94cb46 ntdll!RtlpDosPathNameToRelativeNtPathName_Ustr+0x14c [c:\ros\reactos\reactos\sdk\lib\rtl\path.c @ 938]
      00d7f1b0 7c94c791 ntdll!RtlDosPathNameToRelativeNtPathName_Ustr+0x76 [c:\ros\reactos\reactos\sdk\lib\rtl\path.c @ 1159]
      00d7f254 7c94c708 ntdll!RtlDoesFileExists_UstrEx+0x31 [c:\ros\reactos\reactos\sdk\lib\rtl\path.c @ 1180]
      00d7f274 7c94cbb1 ntdll!RtlDoesFileExists_UEx+0x38 [c:\ros\reactos\reactos\sdk\lib\rtl\path.c @ 1258]
      00d7f2b8 7c92a677 ntdll!RtlDosSearchPath_U+0x31 [c:\ros\reactos\reactos\sdk\lib\rtl\path.c @ 1899]
      00d7f5e0 7c9234af ntdll!LdrpCheckForLoadedDll+0x187 [c:\ros\reactos\reactos\dll\ntdll\ldr\ldrutils.c @ 2023]
      00d7f6a8 7c76ec9b ntdll!LdrGetDllHandleEx+0x49f [c:\ros\reactos\reactos\dll\ntdll\ldr\ldrapi.c @ 719]
      00d7f730 7b66d7b9 kernel32!LoadLibraryExW+0x1cb [c:\ros\reactos\reactos\dll\win32\kernel32\client\loader.c @ 353]
      00d7f77c 7b66d4a2 shell32!RegLoadMUIStringW+0x249 [c:\ros\reactos\reactos\dll\win32\shell32\vista.c @ 164]
      00d7f7d4 7b65498b shell32!RegLoadMUIStringA+0xb2 [c:\ros\reactos\reactos\dll\win32\shell32\vista.c @ 204]
      00d7f894 7b65dcdb shell32!HCR_GetClassNameA+0xdb [c:\ros\reactos\reactos\dll\win32\shell32\wine\classes.c @ 450]
      00d7f9c8 7b6597e0 shell32!_ILSimpleGetText+0x1bb [c:\ros\reactos\reactos\dll\win32\shell32\wine\pidl.c @ 2023]
      00d7fc04 7b630c2a shell32!ILIsParent+0xf0 [c:\ros\reactos\reactos\dll\win32\shell32\wine\pidl.c @ 561]
      00d7fc24 7b631cf4 shell32!ILIsParentOrSpecialParent+0xba [c:\ros\reactos\reactos\dll\win32\shell32\cdefview.cpp @ 1892]
      00d7fc4c 7b634aa2 shell32!CDefView::OnChangeNotify+0x44 [c:\ros\reactos\reactos\dll\win32\shell32\cdefview.cpp @ 1908]
      00d7fc78 7b6820fc shell32!CDefView::ProcessWindowMessage+0x272 [c:\ros\reactos\reactos\dll\win32\shell32\cdefview.cpp @ 311]
      00d7fce4 7b636add shell32!ATL::CWindowImplBaseT<CToolbar<unsigned long>,ATL::CWinTraits<1442840576,0> >::WindowProc+0x9c [c:\ros\reactos\reactos\sdk\lib\atl\atlwin.h @ 1382]
      00d7fd08 7c56130a shell32!CDefView::WindowProc+0x4d [c:\ros\reactos\reactos\dll\win32\shell32\cdefview.cpp @ 296]
      00d7fd38 7c550404 user32!CALL_EXTERN_WNDPROC+0x1a
      00d7fe00 7c555bce user32!IntCallWindowProcW+0x474 [c:\ros\reactos\reactos\win32ss\user\user32\windows\message.c @ 1521]
      00d7fe8c 7c92f891 user32!User32CallWindowProcFromKernel+0x24e [c:\ros\reactos\reactos\win32ss\user\user32\windows\message.c @ 2966]
      00d7fee0 7b6905cc ntdll!KiUserCallbackDispatcher+0x2e
      00d7ff54 00402825 shell32!SHDesktopMessageLoop+0xcc [c:\ros\reactos\reactos\dll\win32\shell32\shelldesktop\cdesktopbrowser.cpp @ 473]
      00d7ff70 004013d3 explorer!_SHDesktopMessageLoop+0x85 [c:\ros\reactos\reactos\base\shell\explorer\rshell.cpp @ 101]
      00d7ffb0 0040158d explorer!CDesktopThread::DesktopThreadProc+0xd3 [c:\ros\reactos\reactos\base\shell\explorer\desktop.cpp @ 54]
      00d7ffb8 7c783a4d explorer!CDesktopThread::s_DesktopThreadProc+0xd [c:\ros\reactos\reactos\base\shell\explorer\desktop.cpp @ 62]
      00d7ffec 00000000 kernel32!BaseThreadStartup+0x5d [c:\ros\reactos\reactos\dll\win32\kernel32\client\thread.c @ 69]

      Another example:

      0159de74 7c933ba4 ntdll!RtlpFindAndCommitPages+0x14a [c:\ros\reactos\reactos\sdk\lib\rtl\heap.c @ 673]
      0159ded0 7c932d00 ntdll!RtlpExtendHeap+0x84 [c:\ros\reactos\reactos\sdk\lib\rtl\heap.c @ 1097]
      0159df50 7c930767 ntdll!RtlpAllocateNonDedicated+0x190 [c:\ros\reactos\reactos\sdk\lib\rtl\heap.c @ 1841]
      0159e020 7b66d471 ntdll!RtlAllocateHeap+0x307 [c:\ros\reactos\reactos\sdk\lib\rtl\heap.c @ 2040]
      0159e068 7b65498b shell32!RegLoadMUIStringA+0x81 [c:\ros\reactos\reactos\dll\win32\shell32\vista.c @ 197]
      0159e128 7b65dcdb shell32!HCR_GetClassNameA+0xdb [c:\ros\reactos\reactos\dll\win32\shell32\wine\classes.c @ 450]
      0159e25c 7b659615 shell32!_ILSimpleGetText+0x1bb [c:\ros\reactos\reactos\dll\win32\shell32\wine\pidl.c @ 2023]
      0159e498 7b65486c shell32!ILIsEqual+0x125 [c:\ros\reactos\reactos\dll\win32\shell32\wine\pidl.c @ 509]
      0159e4a8 7b6534b3 shell32!should_notify+0x6c [c:\ros\reactos\reactos\dll\win32\shell32\wine\changenotify.c @ 356]
      0159e9e0 7b626bcd shell32!SHChangeNotify+0x693 [c:\ros\reactos\reactos\dll\win32\shell32\wine\changenotify.c @ 495]
      0159ec80 7b62657b shell32!SHNotifyDeleteFileW+0x18d [c:\ros\reactos\reactos\dll\win32\shell32\shlfileop.cpp @ 641]
      0159f110 7b626563 shell32!SHELL_DeleteDirectoryW+0x12b [c:\ros\reactos\reactos\dll\win32\shell32\shlfileop.cpp @ 393]
      0159f5a4 7b626563 shell32!SHELL_DeleteDirectoryW+0x113 [c:\ros\reactos\reactos\dll\win32\shell32\shlfileop.cpp @ 391]
      0159fa38 7b628848 shell32!SHELL_DeleteDirectoryW+0x113 [c:\ros\reactos\reactos\dll\win32\shell32\shlfileop.cpp @ 391]
      0159fa70 7b629e01 shell32!delete_files+0x248 [c:\ros\reactos\reactos\dll\win32\shell32\shlfileop.cpp @ 1533]
      0159fb6c 7b614538 shell32!SHFileOperationW+0x261 [c:\ros\reactos\reactos\dll\win32\shell32\shlfileop.cpp @ 1773]
      0159ff50 7b614727 shell32!DoDeleteDataObject+0x548 [c:\ros\reactos\reactos\dll\win32\shell32\folders\crecyclebin.cpp @ 1185]
      0159ff78 7c378e46 shell32!DoDeleteThreadProc+0x57 [c:\ros\reactos\reactos\dll\win32\shell32\folders\crecyclebin.cpp @ 1214]
      0159ffb8 7c783a4d shlwapi!SHLWAPI_ThreadWrapper+0xc6 [c:\ros\reactos\reactos\dll\win32\shlwapi\thread.c @ 304]
      0159ffec 00000000 kernel32!BaseThreadStartup+0x5d [c:\ros\reactos\reactos\dll\win32\kernel32\client\thread.c @ 69]

      Shell change notifications call ILIsParentOrSpecialParent / ILIsEqual many many times, but these functions always take the slow path (heap allocations, registry queries, LoadLibrary). They should be optimized for the common case.

      Attachments

        1. pidl.c.patch
          4 kB
        2. pidl.c.patch
          4 kB
        3. pidl.c.patch
          4 kB
        4. pidl.c.patch
          4 kB
        5. pidl.c.patch
          2 kB

        Issue Links

          Activity

            People

              Smiley Giannis Adamopoulos
              ThFabba ThFabba
              Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: