Squeeze More Power from Your Windows XP
Windows XP is designed as a consumer level product with many safe guards to protect the operating system from being abused. Thus most applications cannot fully utilize its power. I am going to show you a few tricks to make Windows XP works harder and better with your NeoTicker.
(Lawrence – the tricks discussed in this article involve modifying the Windows registry which is a high risk operation. If you modified the registry incorrectly, you will not be able to start up Windows, and complete reinstallation of Windows will be required. Do not attempt the changes stated in this article without proper protective measures like having complete backup first.)
Opening a Big Window Can Crash Your Application
If you have multiple monitors, it is likely that you will want to maximize a chart across multiple monitors from time to time.
With a simple picture viewer application, if you expand a picture viewing window to cover 8 monitors, Windows XP could crash immediately (depending on which patches you have installed). You probably will think that is a bug in the picture viewer application, try again. The real cause is Windows XP itself.
If your computer does not have high-end graphic card(s), the burden of drawing this huge window will fall onto Windows XP. If the memory requirement of this window exceeded the safe guard limit of Windows XP, Windows will simply terminate the hosting application of this window. In short, Windows XP is a very good policeman that guard against potentially hostile applications from damaging its normal functions.
This safe guard limitation of Windows XP also block you from having too many icons on your desktop. Thus, if you open up a directory with too many files using the Windows Explorer, and that the safe guard limitation of Windows XP is exceeded, the Windows Explorer instance will crash and disappear at once. If you use the Windows default setting of opening all your folders in the same process, then all the Windows Explorer windows will crash at the same time.
Trick 1 – Set Each Folder to Run in Its Own Process
When you open your Windows Explorer to view the files inside a drive, directory or folder, you are using a Windows Explorer process. When you have multiple folders opened in individual windows, they are all managed by the same process within Windows.
By enabling the following option within the Windows Explorer window –
View menu>Folder options>View tab>Advanced settings>Launch folder windows in a separate process
You can avoid your folders being closed down by Windows XP if one of them is opened with more resource requirement than Windows XP is willing to spare.
Trick 2 – Modify the Desktop Heap
The safe guard limitation we are talking about protects the shared resource Desktop Heap. Desktop Heap is responsible for providing memory for icon drawing, windows drawing, etc. Windows XP by default allows a small percentage of this heap to be used. We can expand this heap so that more icons and windows can be accommodated.
To expand the heap, follow the following steps,
1. Start the registry editor using the Start menu, choose Run and type in the registry editor name,
this should bring up the registry editor.
2. Locate the key
This entry is a very long string and part of this string should contain the SharedSection setting.
Modify the SharedSection from something like,
Then reboot the machine to make the changes take effect.
Each value in the SharedSection represents the maximum usage per specific type of access into windows.
The middle value that we just modified is the one that is responsible for providing desktop heap to the desktop used by a single login to the system. The increase from 3072 to 8192 will allows at least 120 windows to be created without intervention from Windows XP. (Trick 3 is required to make this possible)
If you need more funtion windows created, then you need to increase this value further to allow for more function windows to be created. Remember that the maximum heap size is 48Mb.
Having Too Many Windows Opened Can Crash Windows XP
One well known issue with Windows 2000 or XP is that you can only open up to 64 Internet Explorers at a time. Many people guess that it has something to do with a hard limit imposed by Microsoft as the number 64 is a perfect exponent in base 2.
That guess is completely wrong. The reason why Windows XP cannot open more than 64 windows is due to the fact that there is a 10,000 user objects handles limitation imposed by Windows 2000 and Windows XP. Per instance of Internet Explorer, it uses up more than a hundred user handles, which are responsible for the management and identification of various objects managed in Internet Explorer.
Thus by the time you are opening the 64th instance of Internet Explorer, you just used up all the available user handles and Windows 2000 / XP will simply refuse to allocate more resources and terminate Internet Explorer at once as if it is a hostile application.
This limitation translates to about 64 to 65 Time Chart windows when NeoTicker is running within Windows 2000 or XP. If there is no such limitation, it is obvious that you can open a lot more function windows because Windows NT has no such limitation and we have successfully opened well more than 200 function windows in Windows NT and running that in real-time.
Trick 3 – Modify the Maximum User Handles Per Process
Open the registry editor
regedt32, then look for the keys,
The user process handle quota has a hard limit of 18000, thus you can increase the default from 10000 to 18000 to make it possible to create many more function windows in Windows 2000 or Windows XP.
The user post message limit is another user modifiable setting affecting applications like NeoTicker that has heavy communications among its own threads and with other applications within Windows. If you track a lot of symbols using any one of the supported ActiveX data feeds, then you can increase this number from 10000 to 18000.
Windows 2000 and Windows XP imposed some unnecessary limitations to the user applications that limit their potentials. Luckily Microsoft recognize the need to break such barrier for the power users and made available the settings to be modified when it becomes necessary to change the default settings.