Yet another blog again

Icon

Website performance tuning exercise- jslint+jsmin+Yslow+gzip on IIS7

Day in front end land (way to insult yourself and regain composure)

1. Use Yslow on Firefox, click on the components/stats to find out the offenders.

2. Accept humbly the results around – # of http calls/javascript files – their size/non use of cache either at client/server, non combination of common js/css files. Start from initial size of 375 k of most complex page.

3. Start fixing -

a. Use jslint to run on js files to find “loose interpretation” problems of syntax. Forgetting a “;” caused me sleepless night for particular  codepath.

b. Use jsmin to safely minify the javascript files. Additionally look at packer as wrapper.

c. Use yslow to identify problem areas (grok  yslow scoring -ignore CDN advice)

d. Tread safely on “minimizing the js file calls” as individual files could be present across files and may not require combining. Tackle this at end.

e. First enable gzip on iis7 for static and dynamic stuff assuming modern browsers will be used.

js-gzip

 f. Use the caching of iis7 for “non changing” files like jpg/css etc.

g. Attempt combining css files and changing the references (little cumbersome) – actually this can be overcome by “custom http module”.(don’t bother with http module as of yet)

h. Attempt combining js files as part of the deployment post step and change the references across aspx/html files.

Gzip always does not work for IIS7/IIs6 as you expect :) live with it.

yslow15

 

 

 

 

But final tested size of 33k is well worth the effort :) .

IIS7 – config changes

1.  Enable the IIS7 compression
AppHost config (way below system32\inetsrv\config)

<httpCompression directory=”%SystemDrive%\inetpub\temp\IIS Temporary Compressed Files”>
<scheme name=”gzip” dll=”%Windir%\system32\inetsrv\gzip.dll” />
<staticTypes>
<add mimeType=”text/*” enabled=”true” />
<add mimeType=”message/*” enabled=”true” />
<add mimeType=”application/x-javascript” enabled=”true” />
<add mimeType=”*/*” enabled=”false” />
</staticTypes>
<dynamicTypes>
<add mimeType=”text/*” enabled=”true” />
</dynamicTypes>
</httpCompression>

2. Enable the dynamic compression

appcmd set config -section:urlCompression /doDynamicCompression:true

3. Enable the <serverruntime frequenthitthreshold=”1″> from default of 2 ensuring file will be compressed at first request rather than try to wait for 2 requests within 10 secs of same kind.

%windir%\system32\inetsrv\appcmd.exe set config
-section:system.webServer/serverRuntime -frequentHitThreshold:1

Filed under: Runtime, front end, javascript , , , ,

Understanding Indian Multilingual computing

After my colleague and respected friend Deepak Gulati implemented the transliteration from Kannada to english and back for one of the projects, my interest in understanding the challenges increased beyond the windows api coding of locale specific world and initial palindrome check for multibyte characters :) .

I found a great resource via IITM- Achraya explaining the same with context of Indian languages.

In the present project I also gained new respect for southern languages which do not add to the confusion like Hindi’s devanagari  or English does. Phonetic base of these languages helps in correct granular correct pronounciation and representation using a good script (brahmi origin).

Words are just C,V, CV,CCV or in extreme cases CCCV where C stands for consonant and V for vowel. Challenge lies in way the vowel is combined with consonant to provide that unique syllable representing the sound. Challenge with Devanagari representation of words like राष्ट्रिय, आत्मविश्वास,विश्व are pretty difficult to get right in the head, we just remember it by rote and as we did in childhood make fun of people south of Vindhyas for not getting matra, ling etc right.  I was spelling nazi (remember soup nazi) and supporter of Hindi as the national language. But lately – must say pretty lately I have come to appreciate the Tamil language (why there is no need for the people residing there to learn hindi – why that is false patriotism, why it stokes the “rule” by the north and resistance feeling, heard even ravan killing is sort of white north wnning over the dark dravidian) and its bretheren. With help of Nudi keyboard which is phonetic in nature – I am finding it easier to learn/type spoken kannada. The default keyboard is inscript which is common for Indian languages but then it loses the nuances of each language.

MS has taken steps over number of years to support multiple languages except providing local language OS :) – now I can appreciate it little better as it would be tough to get it right and then maintain it.

there are 4 parts

Entering ( keyboard, mapping to qwerty)

Displaying (font -glyph)

Storage (encoding – how many bytes to store a syllable)

working with data (sorting/searching/frequency count etc).

With this new information I have new found respect for Sanskrit which can pack so much of information in such short shlokas/stotras. 

Filed under: Database, Runtime , , , ,

Categories