Showing posts from 2017

JS For Loop Code Performance

Perfomance is always the keyword! Every single website strives for being fast - lightning fast! Faster the site, better is the user interaction and better is the conversion. I face this challenge everyday to make sites faster and in the process I ended up testing the 'for' loop with different conditions and I am sharing it here. All observations are a result of running multiple tests for the same set of data.

Regular For Loop

    This is a regular, non-ES6, forward moving for loop which takes anywhere between 0.04 to 0.05 ms.

Lodash _.ForEach

This is the lodash version of the for loop (_.ForEach) takes anywhere between 0.18 to 0.21 ms.

    Now comes the ES6 for loops. I did a forward iterating and a reverse for loop too and I noticed dramatic improvements in performance.

Forward iterating ES6 for loop

This is a regular for loop using ES6 syntax which included 'let' instead of 'var' for variable declaration. The performance improvements here were just amazing. It too…

jQuery Mobile's Next Big Step

A huge shout out to the jQuery Mobile team for releasing jQuery Mobile 1.5.0-alpha.1. This has been long overdue. This release is huge - Tons of issues fixed, integration with jQueryUI and a bunch of new and re-written widgets. In their own words - "We have closed and fixed hundreds of bugs getting to our lowest bug count since the initial release of jQuery Mobile!" That's how big the release is! Take a look at the Dev Demos they have hosted!
    The new and improved jQuery Mobile looks so much more better than it's predecessors. Give it a try and look around. It's time to upgrade soon. Some of the major changes that have happened are listed below.
Modularized code     Entire code is now modularized so that you can now include only the code that you need in your jQuery Mobile application. This should make your application lighter.
NPM Support     NPM support is finally here. The jQuery Mobile npm-package is now completely owned and maintained by the jQuery Mob…

Happy New Year 2017

As the last working day of 2016 came to an end last Friday, the office floors wore a deserted look and  every heart filled with the spirit of the new year was making plans to welcome the new year! This is the time, when everyone sits back, takes a break from all their routine work and looks forward to a new opportunity, a new day and new year of learning.

    Today on the first day of this new year 2017, I wish everyone a very happy and a prosperous new year! Love more, learn more! Be safe, be happy!