Tuesday 11 August 2009

Performance/ Optimization Tips

General


1. When testing for memory or timings, the first open of a document after bouncing server, always takes huge amount of resources. Hence this one should be ignored for the time being. But you should look into it atleast once to see if the first open can also be optimized.
2. When unsure of the results, perform the same scenario about 10 times to reach a conclusion

Accessibility links

W3ORG Specs:


  1. Quick Tips - http://www.w3.org/WAI/quicktips/
  2. Live Regions - http://www.w3.org/TR/aria-state/
  3. Eg of Live Regions: - http://www.alistapart.com/articles/waiariahttp://accessibleajax.clcworld.net/
  4. RIA - http://www.w3.org/TR/aria-roadmap/
  5. Report on WAI Markup for AJAX Live Regions - http://developer.mozilla.org/en/docs/AJAX:WAI_ARIA_Live_Regions
  6. ARIA Reference Implementation - http://test.cita.uiuc.edu//aria/

Shortest code to read entire file

I don't remember where I had read this, but this in undoubtedly the smallest piece of code for reading the whole file.
Scanner loScanner = new Scanner(new File("C://Fazeel-C//MSS//workspace//FastTreeProj//src//sample//JSONs.txt"));
loScanner.useDelimiter("\\Z");
String wholeFile = loScanner.next();       
loScanner.close();