Join-fu is the art of performance-tuning your application's SQL. Join Jay in a fun, irreverent look at the common ways application developers misuse and abuse
J’ai publié il y a quelques jours un article expliquant comment obtenir un dump des opcodes d’un script PHP, en utilisant l’extension VLD - Vulcan Logic Dumper.
The key to a successful mobile site is high performance and reliability across a wide range of device capabilities and network latencies. However, the mobile web is a hostile environment with support for HTML5, JavaScript and CSS varying widely across browsers and devices. This talk will explain best practices to build high performance mobile sites that work across a wide range of devices and capabilities. The focus will be on lessons learnt at Betfair while rewriting the entire mobile web stack and how we used techniques to maximise performance and reliability. After discussing the problems faced in mobile the talk will explain how adaptive techniques can be used to provide progressive enhancement. This will be followed by an explanation of why and where performance bottlenecks occur and how these can be solved.
Why is Optimizing for the Mobile Web so Important?Performance
Mobile devices are getting faster CPUs, more RAM, faster GPUs, and faster network access as we transition from 2G and 3G to 4G. Despite the drumbeat of progress, mobile devices are underpowered when compared to our computers. In more concrete terms, loading network resources takes longer, unpacking images takes longer, painting the page takes longer, executing scripts takes longer. It’s safe to assume that your page runs 5 to 10 times slower on a mobile device.
Battery
Mobile devices are exclusively battery powered. Users of mobile devices want that battery to last as long as possible. A sub-optimal site will drain a battery much quicker than needed. Minimize network traffic and reduce paints to reduce battery drain. When you fetch a resource, the WiFi or cell radio must be on, which drains battery. When the browser paints an element, the CPU and GPU usage spikes, which also drains battery.
Engagement
“Performance is there to increase the metric that matters most to you. In Facebook we care about scrolling. In an A/B test, we slowed down scrolling from 60fps down to 30fps. Engagement collapsed. We said okay, therefore scrolling matters.” - Facebook at Edge Conference
Mobile users expect to be able to get in and out quickly. The fastest site will get the most engagement.
This tutorial explains how to collect and explore CPU profiles.
Note: If you are a Web Developer and want to get the latest version of Developer Tools, you should use the Google Chrome release from the Developer Channel.
Using Google Chrome, open the V8 Benchmark Suite page. Click the Start profiling button. The circle changes to red. Now return to the V8 Benchmark Suite page, and either press F5 or click the browser's Reload button to reload the page.
I think there are many developers who don’t realize that most of the jQuery methods they use have native equivalents that require the same or only a slighter larger amount of code to use. Below are a series of code samples showing some popular jQuery functions along with their native counterparts.
ImmutableArray, une alternative plus rapide à ImmutableList pour les scénarios de lecture seule, avec accès par index, est disponible dans la dernière version des collections immuables pour .Net.
ImmutableList a une approche équilibrée : grâce à sa structure interne complexe, ajouter un élément est une opération de complexité O(log n) (NdT: ImmutableList est implémentée à l'aide d'un arbre binaire). De même, accéder à un élément par index peut prendre O(log n).
ImmutableArray est beaucoup plus simple. C’est une structure qui enveloppe un tableau. D’après ildasm, la structure ne possède aucun autre champ, ce qui signifie que la lecture s’effectue en O(1). A l’inverse, ajouter un élément nécessite une copie complète du tableau sous-jacent, ce qui en fait une opération de complexité O(n). Immo Landwerth fait les recommandations suivantes :
Touching the DOM comes at a cost; if you're appending a lot of elements to the DOM, you will want to append them all at once, rather then one at a time. This is common problem when appending elements within a loop.
Ce conseil vaut pour toutes les boucles parcourant un tableau : la variables qui ne varient pas pendant la boucle doivent être placées dans des variables en dehors de la boucle.
Selector optimization is less important than it used to be, as more browsers implement document.querySelectorAll() and the burden of selection shifts from jQuery to the browser. However, there are still some tips to keep in mind.
The DOM is slow; you want to avoid manipulating it as much as possible. jQuery introduced detach() in version 1.4 to help address this issue, allowing you to remove an element from the DOM while you work with it.
12345678var $table = $( "#myTable" );var $parent = $table.parent(); $table.detach(); // ... add lots and lots of rows to table $parent.append( $table );
Let's get into several common types of queries that developers struggle with, showing SQL solutions, and then analyze them for optimal efficiency. I'll cover E
Lors de l’exécution d’un script PHP, l’interpréteur PHP passe par deux étapes : Tout d’abord, le script écrit en langage PHP est compilé en opcodes, Puis ces opcodes sont exécutés.
One of the biggest bottlenecks in mobile web browsers is painting your page. Painting is the process of drawing an element on the page with the specified styling. When one element is expensive to paint it slows down painting of the whole page. Chrome makes an attempt at caching previously painted elements in an offscreen buffer. But, on mobile the amount of GPU RAM available is limited, limiting the number of elements that can be cached off screen. The side effect is more paints and each paint is slower than the desktop. In order to have responsive scrolling, you must minimize paint times.
This article takes a jQuery lover through some of the harder, more misunderstood, JavaScript methods, functions and more to show how native technology has caught up, how it's not as difficult as it seems and that native JavaScript is probably going to hit you like a brick in the face fairly soon - if it hasn't already. As a front-end developer I am pretty passionate about knowing my tech, and admittedly I began with jQuery and moved to learning JavaScript, I know many others have too. This article is here to talk anyone looking to dive into native JavaScript development over jQuery, and should hopefully open up some doors into the future of your coding.
Nous allons dans ce tutoriel voir comment optimiser une liste déroulante afin d'en améliorer la performance et nous verrons comment ajouter un filtre sur une liste qui permettra à l'utilisateur de rechercher l'élément qu'il souhaite afficher.
Un solution d'optimisation d'une liste déroulante comme celle-ci est le recyclage des éléments de la liste.
Même si la liste contient plusieurs éléments, elle ne peut parfois pas tous les afficher si on ne scroll pas, les éléments les plus utiles sont ceux qui sont visibles !
Le principe est simple, à chaque fois qu'une ligne sort de l'écran, nous la recyclons et l'affectons au prochain élément de la liste.
Bien sûr, dans les années 90 et au tout début des années 2000, Java pouvait être lent à certains moments.
Cependant nous avons eu plus de 10 ans d'améliorations de la machine virtuelle et du JIT. Depuis, la performance globale de Java est furieusement rapide.
Dans six benchmarks différents sur les performances web, les frameworks Java occupent 22 des 24 premières positions.
Les « 6 Propositions de l’IE-Club pour une Croissance Innovante » sont diffusées à la suite de la 4eme Edition des Rencontres de l’IE-Club autour de la Green Economy– en partenariat avec le Club CleanTech de l’AFIC et la CCIP - le 26 Juin 2013.
jQuery won't tell you if you're trying to run a whole lot of code on an empty selection – it will proceed as though nothing's wrong. It's up to you to verify that your selection contains some elements.
123456789101112131415161718192021222324252627// Bad: This runs three functions before it// realizes there's nothing in the selection$( "#nosuchthing" ).slideUp(); // Better:var $mySelection = $( "#nosuchthing" ); if ( $mySelection.length ) { $mySelection.slideUp(); } // Best: Add a doOnce plugin.jQuery.fn.doOnce = function( func ) { this.length && func.apply( this ); return this; } $( "li.cartitems" ).doOnce(function() { // make it ajax! \o/ });
This guidance is especially applicable for jQuery UI widgets, which have a lot of overhead even when the selection doesn't contain elements.
To get content containing either thought or leadership enter:
To get content containing both thought and leadership enter:
To get content containing the expression thought leadership enter:
You can enter several keywords and you can refine them whenever you want. Our suggestion engine uses more signals but entering a few keywords here will rapidly give you great content to curate.
Une foule de conseils sur les formats de stockage sql, dont :
- utiliser unsigned int pour les adesses IPv4