News for hackers. Stuff that matters.
Re:SerenityOS demo at Handmade Seattle 2021 [video] by andai on Thursday November 18, 2021 @09:54PM (#29273263)
XP explorer is so much faster it blows my damn mind. I ran it inside Windows 10 in VirtualBox, the explorer window opens instantly and navigates instantly, while the new explorer has lag with every operation. The best way to see this is to copy or rename a file. Explorer, a Microsoft product (presumably better integrated with the kernel) will take a second or two to show the result of the action that it itself performed (!!), while Sublime Text open in the background will detect the change and display it instantly. Madness!
Re:SerenityOS demo at Handmade Seattle 2021 [video] by 0xcde4c3db on Thursday November 18, 2021 @10:17PM (#29273403)
I feel like way too many engineers ca. 2005-2010 internalized the misconception that "asynchronous" is synonymous with "I don't need to care how long it takes". It turns out that the distinction isn't trivial.
Re:SerenityOS demo at Handmade Seattle 2021 [video] by exikyut on Thursday November 18, 2021 @11:39PM (#29273901)
I wonder if Explorer is deliberately updating the display after a timeout to handle the scenario where many files might rename in short succession.

One simple way to handle this could be to compute the timer to fire at $last_rename_time + $delay, initialize $last_rename_time to 0 (and later set it to the current time in milliseconds), then only actually start the timer if the calculated value is actually in the future (which it won't be for the first run).

Of course... Explorer might (...still) be using periodic polling. xD

You might be able to use Event Tracing for Windows to find out if Explorer is actually following events in real time, with the minor caveat that it might be a bit of a project. I gathered a small handful of ETW-related links over at https://news.ycombinator.com/item?id=28348564 a little while back FWIW.

Re:SerenityOS demo at Handmade Seattle 2021 [video] by aallen90 on Friday November 19, 2021 @04:57PM (#29283109)
I believe this is what's happening. I read something recently from Raymond Chen that it works like:

1. Open file with the delete flag 2. Call a function to set the new file information 3. Close the handle.

The signal that a file was renamed happens in step 2, and that signal/event is what many applications subscribe to. Explorer will wait until the rename is fully completed with the handle closed before showing the change.

Re:SerenityOS demo at Handmade Seattle 2021 [video] by mateuszf on Friday November 19, 2021 @09:07AM (#29277233)
XP explorer stars so fast because it's already running. The desktop with the icons is actually an explorer window.
Re:SerenityOS demo at Handmade Seattle 2021 [video] by Narishma on Friday November 19, 2021 @09:59AM (#29277817)
That's not the case in Windows 10?