¡@

Home 

2014/10/16 ¤W¤È 12:06:02

jquery Programming Glossary: optimisation

Sort an array by the “Levenshtein Distance” with best performance in Javascript

http://stackoverflow.com/questions/11919065/sort-an-array-by-the-levenshtein-distance-with-best-performance-in-javascript

it was inline and for IE8 I did quite a lot of performance optimisation. http www.merriampark.com ld.htm http www.mgilleland.com ld..

Using private jquery with RequireJS - issue after optimisation

http://stackoverflow.com/questions/17615594/using-private-jquery-with-requirejs-issue-after-optimisation

private jquery with RequireJS issue after optimisation I'm putting together a framework using requireJS with a CDN..

jQuery uses (new Function(“return ” + data))(); instead of eval(data); to parse JSON, why?

http://stackoverflow.com/questions/2449220/jquery-uses-new-functionreturn-data-instead-of-evaldata-to-parse

terms of language level weirdness and hence resistance to optimisation. Specifically function victim var a 1 eval 'a 2' return a gives.. and particularly clever minifiers ‰â€” to apply more optimisations. For example the second victim function could have the a variable.. away to return 1 . One use of eval and a lot of potential optimisations aren't going to be doable. Of course in practice for a tiny..

Combining javascripts into a single file

http://stackoverflow.com/questions/2799419/combining-javascripts-into-a-single-file

into a single file Having read up recently on yahoo's web optimisation tips and using YSlow I've implemented a few of their ideas on..

$(this) OR event.target OR var input = $(this)

http://stackoverflow.com/questions/3388019/this-or-event-target-or-var-input-this

overhead. However sometimes you need to gear back from optimisation to make sure your code maintains it's readability. Another option..

How to tell jQuery to stop searching DOM when the first element is found?

http://stackoverflow.com/questions/3950888/how-to-tell-jquery-to-stop-searching-dom-when-the-first-element-is-found

method in modern browsers. You can get the optimisation manually by using the DOM querySelector method which is built..

Where is the best place to put Google Analytics with MVC3

http://stackoverflow.com/questions/6402193/where-is-the-best-place-to-put-google-analytics-with-mvc3

it shouldn't matter so much. Most I've heard on web page optimisation has always said to put the javascript towards the end of the..

Sort an array by the “Levenshtein Distance” with best performance in Javascript

http://stackoverflow.com/questions/11919065/sort-an-array-by-the-levenshtein-distance-with-best-performance-in-javascript

few years ago and implemented a Levenshtein algorithm since it was inline and for IE8 I did quite a lot of performance optimisation. http www.merriampark.com ld.htm http www.mgilleland.com ld ldjavascript.htm Damerau “Levenshtein distance Wikipedia var..

Using private jquery with RequireJS - issue after optimisation

http://stackoverflow.com/questions/17615594/using-private-jquery-with-requirejs-issue-after-optimisation

private jquery with RequireJS issue after optimisation I'm putting together a framework using requireJS with a CDN version of jQuery as is now the recommended approach and having..

jQuery uses (new Function(“return ” + data))(); instead of eval(data); to parse JSON, why?

http://stackoverflow.com/questions/2449220/jquery-uses-new-functionreturn-data-instead-of-evaldata-to-parse

webapp is not returning untrusted JSON strings ‰â€” but in terms of language level weirdness and hence resistance to optimisation. Specifically function victim var a 1 eval 'a 2' return a gives 2 . The eval ‹ed string has operated on victim 's local variable.. code analysis tools ‰â€” which might include JavaScript engines and particularly clever minifiers ‰â€” to apply more optimisations. For example the second victim function could have the a variable completely optimised away to return 1 . One use of eval.. function could have the a variable completely optimised away to return 1 . One use of eval and a lot of potential optimisations aren't going to be doable. Of course in practice for a tiny function like a JSON eval ‹er there isn't going to be a noticeable..

Combining javascripts into a single file

http://stackoverflow.com/questions/2799419/combining-javascripts-into-a-single-file

javascripts into a single file Having read up recently on yahoo's web optimisation tips and using YSlow I've implemented a few of their ideas on one of my sites http www.gwynfryncottages.com you can see..

$(this) OR event.target OR var input = $(this)

http://stackoverflow.com/questions/3388019/this-or-event-target-or-var-input-this

from a DOM element to a jQuery object it's still an unnecessary overhead. However sometimes you need to gear back from optimisation to make sure your code maintains it's readability. Another option of course is just to change what this is. This is javascript..

How to tell jQuery to stop searching DOM when the first element is found?

http://stackoverflow.com/questions/3950888/how-to-tell-jquery-to-stop-searching-dom-when-the-first-element-is-found

so don't use first . In this case jQuery uses the fast DOM querySelectorAll method in modern browsers. You can get the optimisation manually by using the DOM querySelector method which is built to select only the first match .getFirst function selector..

Where is the best place to put Google Analytics with MVC3

http://stackoverflow.com/questions/6402193/where-is-the-best-place-to-put-google-analytics-with-mvc3

snippet so that it loads asynchronously on newer browsers so it shouldn't matter so much. Most I've heard on web page optimisation has always said to put the javascript towards the end of the page because of the way most browsers deal with loading and..