Skip to main content

Posts

Showing posts with the label performance

Russian CDN for jQuery

I recently discovered that the biggest Russian search engine Yandex (yeah, it’s bigger than Google in Russia) is using jQuery on its home page. It also hosts all previous jQuery versions on it’s fast gzip enabled servers just like Google and MIcrosoft do. Because most of the Russian internet users have visited Yandex already, they already have it in their browser cache. I also did route tracing

Russian CDN for jQuery

I recently discovered that the biggest Russian search engine Yandex (yeah, it’s bigger than Google in Russia) is using jQuery on its home page. It also hosts all previous jQuery versions on it’s fast gzip enabled servers just like Google and MIcrosoft do. Because most of the Russian internet users have visited Yandex already, they already have it in their browser cache. I also did route tracing

jQuery.live() – event binding to AJAX loaded elements

jQuery.live() function was introduced in jQuery version 1.3. It makes it easy to dynamically bind events to DOM elements that have not yet been created. In other words, it helps you to easily attach events to AJAX loaded elements that match your criteria. NOTE: If for some reason you are using old versions of jQuery, prior to 1.3, you will need to use event delegation or another method as

jQuery.live() – event binding to AJAX loaded elements

jQuery.live() function was introduced in jQuery version 1.3. It makes it easy to dynamically bind events to DOM elements that have not yet been created. In other words, it helps you to easily attach events to AJAX loaded elements that match your criteria. NOTE: If for some reason you are using old versions of jQuery, prior to 1.3, you will need to use event delegation or another method as

Host jQuery on Microsoft CDN servers

After Microsoft decided to ship and use jQuery library for its JavaScript needs in Visual Studio, hosting jQuery on Microsoft CDN servers is actually a logical and good decision. Yes, some of us might argue that Google already hosts jQuery, but Microsoft can not recommend to use its competitor’s services, can it?! :) Anyway, intention of this post is not to discuss why Microsoft introduced its

Host jQuery on Microsoft CDN servers

After Microsoft decided to ship and use jQuery library for its JavaScript needs in Visual Studio, hosting jQuery on Microsoft CDN servers is actually a logical and good decision. Yes, some of us might argue that Google already hosts jQuery, but Microsoft can not recommend to use its competitor’s services, can it?! :) Anyway, intention of this post is not to discuss why Microsoft introduced its

Javascript for() loop vs jQuery .each() performance comparison

This post is an outcome of 15 minutes of free time and a question that I had yesterday. This question were: How fast jQuery’s .each() method is? How does it compare to javascript’s native for loop? It is clear without any performance tests that native javascript for loop is faster, but I always used jQuery’s .each() utility with caution. It always felt like I will get a performance

Javascript for() loop vs jQuery .each() performance comparison

This post is an outcome of 15 minutes of free time and a question that I had yesterday. This question were: How fast jQuery’s .each() method is? How does it compare to javascript’s native for loop? It is clear without any performance tests that native javascript for loop is faster, but I always used jQuery’s .each() utility with caution. It always felt like I will get a performance

Tip for jQuery & handheld device developers

This week’s usual “Friday short post” about using jQuery in handheld devices. If you are a developer who is using jQuery in applications that were developed for use in environments with small processing power such as handheld devices, mobile phones, PDA’s, etc. you will find this post useful. Anyway, back to the topic. For whatever reasons you chose to use jQuery in your application (I would

Tip for jQuery & handheld device developers

This week’s usual “Friday short post” about using jQuery in handheld devices. If you are a developer who is using jQuery in applications that were developed for use in environments with small processing power such as handheld devices, mobile phones, PDA’s, etc. you will find this post useful. Anyway, back to the topic. For whatever reasons you chose to use jQuery in your application (I would

Convert javascript objects into arrays for better performance

jQuery Howto blog has many posts on your javascript  and jQuery code performance. If you have read the last performance post named “5 easy tips on how to improve code performance with huge data sets in jQuery” then you probably got an idea that it’s better to work with arrays for better javascript performance. The only problem is that jQuery returns an object not an array when you select

Convert javascript objects into arrays for better performance

jQuery Howto blog has many posts on your javascript  and jQuery code performance. If you have read the last performance post named “5 easy tips on how to improve code performance with huge data sets in jQuery” then you probably got an idea that it’s better to work with arrays for better javascript performance. The only problem is that jQuery returns an object not an array when you select

jQuery 1.3.2 Released

It seems that the jQuery’s new maintenance release 1.3.2 has not got enough coverage on other sites and thus a lot of developers still don’t know of it’s release. It was released on the 20 of February and can be downloaded here: Minified (gzipped 19KB) For development (120KB) Notable changes: Faster :hidden/:visible selectors; Faster .height()/.width() methods; Faster selectors

jQuery 1.3.2 Released

It seems that the jQuery’s new maintenance release 1.3.2 has not got enough coverage on other sites and thus a lot of developers still don’t know of it’s release. It was released on the 20 of February and can be downloaded here: Minified (gzipped 19KB) For development (120KB) Notable changes: Faster :hidden/:visible selectors; Faster .height()/.width() methods; Faster selectors

5 easy tips on how to improve code performance with huge data sets in jQuery

Sitting on jQuery's support mailing list I noticed that developers use jQuery with huge data sets and their code becomes very slow. Examples would be generating very long tables with a lot of rows using AJAX to get JSON data. Or iterating through a long (very long) list of data, etc. So I compiled a list of 5 easy tips on how to improve your code performance while working with huge data sets in

5 easy tips on how to improve code performance with huge data sets in jQuery

Sitting on jQuery's support mailing list I noticed that developers use jQuery with huge data sets and their code becomes very slow. Examples would be generating very long tables with a lot of rows using AJAX to get JSON data. Or iterating through a long (very long) list of data, etc. So I compiled a list of 5 easy tips on how to improve your code performance while working with huge data sets in

How to disable all jQuery animations at once

Yesterday I came across jQuery.fx.off setting in jQuery documentation. It disables all jQuery animations effective immediately when you set it's value to true. Consider this code: jQuery.fx.off = true; $("input").click(function(){ $("div").toggle("slow"); }); Your div will be showed/hidden immediately without animation. One of the reasons (as documentation mentions) to disable animations

How to disable all jQuery animations at once

Yesterday I came across jQuery.fx.off setting in jQuery documentation. It disables all jQuery animations effective immediately when you set it's value to true. Consider this code: jQuery.fx.off = true; $("input").click(function(){ $("div").toggle("slow"); }); Your div will be showed/hidden immediately without animation. One of the reasons (as documentation mentions) to disable animations

jQuery 1.2.6 and jQuery 1.3 class selector performance benchmark

Reading about the jQuery 1.3's new selector engine Sizzle and its speed improvements I thought I would do a performance comparison between jQuery 1.2.6 and jQuery 1.3. I was prepared for something good, but the test results blew my mind. I had a page with one unordered list with 1000 items each with a class (class="1", class="2", etc). Here is  are the tests and results: console.time("

jQuery 1.2.6 and jQuery 1.3 class selector performance benchmark

Reading about the jQuery 1.3's new selector engine Sizzle and its speed improvements I thought I would do a performance comparison between jQuery 1.2.6 and jQuery 1.3. I was prepared for something good, but the test results blew my mind. I had a page with one unordered list with 1000 items each with a class (class="1", class="2", etc). Here is  are the tests and results: console.time("