Thursday, February 02, 2006

Implementing AJAX in ASP.NET

Asynchronous JavaScript and XML (AJAX) has recently become the craze thanks, in no small part, to Google’s usage of it in Google Suggest as well as Google Maps. In ASP.NET terms, AJAX allows server-side processing to occur without requiring postback, thus enabling clients (browsers) with rich server-side capabilities. In other words it provides a framework for asynchronously dispatching and processing requests and responses from the server. AJAX leverages a number of existing technologies, which aren't particularly new, however fondness for what these technologies have to offer (collectively, they are AJAX) has recently soared.

It should be pointed out that technologies such as AJAX are very likely going to lead to violations of layered architectures (N-Tier). My opinion is that AJAX increases the likelihood that the presentation logic layer (or worse, the business layer) will leak into the presentation layer. Strict architects, like me, might cringe at this notion. I feel that even if AJAX is used in a manor which slightly violates layer boundaries, the payoffs are well worth it. Of course, that's something you'll need to look at for your specific project and environment.

A nice article on this

Categories: , , , , , , , , , , Can't find what you're looking for? Try Google Search!
Google
 
Web eshwar123.blogspot.com

Monday, January 30, 2006

NTFS Performance Hacks

This is taken from NTFS Performance hacks o'reilly book which is interesting on the performance of NTFS. Taken from this link

1. Disable Short Filenames

By default, NTFS creates an 8.3 filename every time it creates a long filename, which adds a bit of time to the file creation process. To speed things up, you can disable short filenames using the fsutil command:

fsutil behavior set disable8dot3 1

Restart your machine for this to take effect. A couple of caveats:

* You'll typically notice a performance difference only on drives that have a very large number of files (300,000 or more) but relatively few folders, and where a lot of your files have names that start similarly (for instance, NTFS Performance Hacks version 1.doc, NTFS Performance Hacks version 2.doc, and so on). That's because if you have a lot of files that start with the same characters in their filenames and occupy the same folder, NTFS has to work harder (and take more time) to generate unique 8.3 names for these files.
* If you have an older version of Microsoft Office or some older third-party apps, they may not work properly if 8.3 names are disabled. So test first before you mass-implement this hack.

2. Name Your Files Appropriately

Let's say you can't disable 8.3 filenames because of older software on your machine. You can still improve NTFS performance by choosing a naming scheme for your files so that files located in the same folder differ at the start of their names instead of at the end. So for example, instead of

NTFS Performance Hacks version 1.doc
NTFS Performance Hacks version 2.doc

and so on, you might name your files

1 NTFS Performance Hacks.doc
2 NTFS Performance Hacks.doc

and so on.

That way NTFS won't have to work so hard to generate a unique 8.3 name for each file in the folder.

Related Reading
Windows Server Hacks

Windows Server Hacks
100 Industrial-Strength Tips & Tools
By Mitch Tulloch
Table of Contents
Index

Read Online--Safari Search this book on Safari:


Code Fragments only
3. Use More Folders

If you frequently need to open, close, create, or delete certain types of files, keep the number of such files in each folder small. In other words, if you have a lot of these files, create additional folders to spread them out between folders. If this isn't practical for some reason, then the first two hacks above can help compensate for having too many files in one folder.
4. Use More Partitions

In Windows 2000, when you partition a large disk (50GB or more, say) into several smaller NTFS volumes (10GB each), you can speed disk performance by up to 10 percent. NTFS on Windows XP has been improved to perform better overall, but you can still squeeze a percent or two of better performance out of a large disk by partitioning it into several smaller volumes.
5. Plan Your Cluster Size

The default cluster size on NTFS volumes is 4K, which is fine if your files are typically small and generally remain the same size. But if your files are generally much larger or tend to grow over time as applications modify them, try increasing the cluster size on your drives to 16K or even 32K to compensate. That will reduce the amount of space you are wasting on your drives and will allow files to open slightly faster.

Two caveats, though:

* If you want to compress older files to save disk space using NTFS compression, you have to leave the cluster size at 4K.
* The smaller your files (compared with the cluster size), the more fragmented your volume will tend to become over time.

The second caveat means that you should also ...
6. Defragment Regularly

Fragmented drives increase the time it takes for applications to open, close, create, or delete files. A good practice is to use Windows XP's Disk Defragmenter tool to defrag your drive at least once a week, especially if you run applications that frequently modify files and you have a lot of files on your drives. If you like, you can use the Scheduled Task Wizard to automate this process. See How to Automate Disk Defragmenter Using Task Scheduler Tool in Windows XP in the Microsoft Knowledge Base for instructions.
7. Reserve Space for the MFT

NTFS on Windows XP improves performance of the Master File Table (MFT) over Windows 2000 by not placing some of the MFT metadata files at the start of the disk. This enhancement alone can boost NTFS performance on Windows XP by up to 10 percent over Windows 2000. But you can squeeze out even better performance by ensuring that your drive has enough room for the MTF to grow if it has to. This will prevent the MTF from becoming fragmented, which is important because the Disk Defragmenter tool can't defragment the MFT.

By default, Windows XP reserves 12.5 percent of each NTFS volume (an area called the MFT zone) for exclusive use of the MFT. So if you plan to store tons of small files (under 8K, say) on your volume, your MFT may run out of space before your volume's free space does, and the result will be MFT fragmentation. To prevent this from happening, you can reserve additional space for the MFT using the fsutil command:

fsutil behavior set mftzone 2

This doubles the size of the reserved MFT zone to 25 percent of the volume. Of course, this means you lose 12.5 percent of the free space used to store files themselves, so there's a trade-off to consider when implementing this change. You can even make more aggressive changes using set mftzone 3, which reserves 37.5 percent of the volume for the MFT, or set mftzone 4, which reserves a whopping 50 percent. These extreme settings are only useful, however, if you have zillions of files, each smaller than about 1K.

To reset the MFT zone size according to your needs, do the following:

1. Run the fsutil command as described previously.
2. Reboot your system.
3. Create the volumes you need.

To return to the default behavior of reserving 12.5 percent of each volume for MFT, use the fsutil behavior set mftzone 1.
8. Disable Last Access Time

By default, each file and folder on an NTFS volume has an attribute called Last Access Time, which records the last time the file or folder was opened, read, or changed. This means even when you read a file on an NTFS volume, a write action occurs on that volume too. Normally this isn't a problem, but if you have an application that tends to frequently access files for short periods of time, this feature of NTFS can really slow performance. Fortunately, you can use fsutil to disable writing to the Last Access Time attribute:

fsutil behavior set disablelastaccess 1

Once this is done, the Last Access Time attribute for newly created files will simply be their File Creation Time.

One caveat: disabling Last Access Time may affect the operation of backup programs that use the Remote Storage service.
9. Turn Off (or On) the Indexing Service

Whether you enable or disable the Indexing Service on Windows XP depends on your needs. If you search for files on your hard drive only rarely, it's probably best to leave Indexing turned off, since it adds a slight overhead to NTFS operation and also uses up disk space to store the catalog. But if you search for files on your hard drive frequently (and need to search the contents of files as well) then turn Indexing on, as it will speed the search process considerably.
10. Use FAT32 for the Paging File

Finally, if you have a second physical disk in your machine, you can boost performance by moving your paging file (pagefile.sys) onto your second drive. To make this work best, do the following:

1. Create a volume on your second drive, making sure the volume is big enough to hold your paging file. (Three times your RAM amount will be more than enough.)
2. Format the new volume using FAT32 instead of NTFS, since FAT32 gives slightly better read performance on smaller volumes.
3. Don't create any additional volumes on your second drive--that is, leave this drive for exclusive use by the paging file.

So in other words, our final NTFS tweak is to not use NTFS for your paging volume.

Categories: , , , , , , , , , , , , , , , , Can't find what you're looking for? Try Google Search!
Google
 
Web eshwar123.blogspot.com

Why Dreams Are Forgotten After Waking

A good article on Why dreams are forgotten after waking up ....

That a dream fades away in the morning is proverbial. It is, indeed, possible to recall it. For we know the dream, of course, only by recalling it after waking; but we very often believe that we remember it incompletely, that during the night there was more of it than we remember. We may observe how the memory of a dream which in the morning was still vivid fades in the course of the day, leaving only a few trifling remnants. We are often aware that we have been dreaming, but we do not know of what we have dreamed; and we are so well used to this fact- that the dream is liable to be forgotten- that we do not reject as absurd the possibility that we may have been dreaming even when, in the morning, we know nothing either of the content of the dream or of the fact that we have dreamed. On the other hand, it often happens that dreams manifest an extraordinary power of maintaining themselves in the memory. I have had occasion to analyse, with my patients, dreams which occurred to them twenty-five years or more previously, and I can remember a dream of my own which is divided from the present day by at least thirty-seven years, and yet has lost nothing of its freshness in my memory. All this is very remarkable, and for the present incomprehensible. Read more from this link

Categories: , , , , , , , , , Can't find what you're looking for? Try Google Search!
Google
 
Web eshwar123.blogspot.com

Make windows Faster ever than before

I have recently seen a good article which gives a good understanding of making windows faster than before....

DISABLE INDEXING SERVICES

Indexing Services is a small little program that uses large amounts of RAM and can often make a computer endlessly loud and noisy. This system process indexes and updates lists of all the files that are on your computer. It does this so that when you do a search for something on your computer, it will search faster by scanning the index lists. If you don't search your computer often, or even if you do search often, this system service is completely unnecessary. To disable do the following:

1. Go to Start
2. Click Settings
3. Click Control Panel
4. Double-click Add/Remove Programs
5. Click the Add/Remove Window Components
6. Uncheck the Indexing services
7. Click Next


OPTIMISE DISPLAY SETTINGS

Windows XP can look sexy but displaying all the visual items can waste system resources. To optimise:

1.Go to Start
2. Click Settings
3. Click Control Panel
4. Click System
5. Click Advanced tab
6. In the Performance tab click Settings
7. Leave only the following ticked:
- Show shadows under menus
- Show shadows under mouse pointer
- Show translucent selection rectangle
- Use drop shadows for icons labels on the desktop
- Use visual styles on windows and buttons

Wanna more.... then Watch this article

Categories: , , , , , , , , , , , , , , , , , , , , , Can't find what you're looking for? Try Google Search!
Google
 
Web eshwar123.blogspot.com