News Windows 7 took ages to load if you had a solid background. Now we know why

News

Команда форума
Редактор
Регистрация
17 Февраль 2018
Сообщения
38 930
Лучшие ответы
0
Реакции
0
Баллы
2 093
Offline
#1
Windows 7 came onto the market in 2009 and put Microsoft back on the road to success after Windows Vista’s annoying failures. But Windows 7 was not without its faults, as this curious story proves.

Some users apparently encountered a vexing problem at the time: if they set a single-color image as the background, their Windows 7 PC always took 30 seconds to start the operating system and switch from the welcome screen to the desktop.

get windows 11 pro for cheap
Windows 11 Pro

Price When Reviewed: 69,99 Euro
Best Prices Today: 49,99 € at PC-WELT Software-Shop – Windows 11 Home | 69,99 € at PC-WELT Software-Shop – Windows 11 Pro

In a recent blog post, Microsoft veteran Raymond Chen explains the exact reason for this. According to him, a simple programming error meant that users had to wait longer for the system to boot. After logging in, Windows 7 first set up the desktop piece by piece, i.e. the taskbar, the desktop window, icons for applications, and even the background image.

The system waited patiently for all components to finish loading and received feedback from each individual component. Or, it switched from the welcome screen to the desktop after 30 seconds if it didn’t receive any feedback.

The problem here: The code for the message that the background image is ready was located within the background image bitmap code, which means that the message never appeared if you did not have a real background image bitmap. And a single color is not such a bitmap.

The result: the logon system waited in vain for the message that the background has finished loading, so Windows 7 never started until the 30 second fallback activated and sent users to the desktop.

The problem could also occur if users had activated the “Hide desktop icons” group policy. This was due to the fact that such policies were only added after the main code had been written and called by an If statement. However, Windows 7 was also unable to recognise this at first and therefore took longer to load.

Chen shows the following code snippet as an example to illustrate the problem:

// Original code
InitialiseDesktopIcons()
{
bind to the desktop folder
enumerate the icons
add them to the screen
Report(DesktopIconsReady);
}

// Updated with group policy support

InitialiseDesktopIcons()
{
if (desktop icons allowed by policy)
{
bind to the desktop folder
enumerate the icons
add them to the screen
Report(DesktopIconsReady);
}
}
Unsolved for months


According to Chen, it took several months for Microsoft to recognize the problem. In November 2009, it was then fixed by an update and has not been a problem since, but is a nice anecdote for the various errors that can occur during programming.

 
Сверху Снизу