Please create an account to participate in the Slashdot moderation system


Forgot your password?
Google Businesses The Internet

Google To Promote Web Speed On New Dev Site 106

CWmike writes "Google has created a Web site for developers that is focused exclusively on making Web applications, sites and browsers faster. The site will allow developers to submit ideas, suggestions and questions via a discussion forum and by using Google's Moderator tool. Google hopes developers will join it in improving core online technologies such as HTML and TCP/IP. For Google, a prime example of how Web performance can be enhanced is the development of HTML 5, which provides a major improvement in how Web applications process Javascript, Google believes. 'We're hoping the community will spend some time on the basic protocols of the Internet,' Google product manager Richard Rabbat said. 'There's quite a bit of optimization that can be done [in that area].'"
This discussion has been archived. No new comments can be posted.

Google To Promote Web Speed On New Dev Site

Comments Filter:
  • by Serious Callers Only ( 1022605 ) on Wednesday June 24, 2009 @10:48AM (#28452433)

    What you really need is a system to 'compile' the source pages to something less readable, but significantly smaller - removing comments, replacing the unneeded end tags, shortening the variable names. If that was automated...

    Something like gzip compression [] perhaps?

  • by Anonymous Coward on Wednesday June 24, 2009 @10:49AM (#28452449)

    This is what's called mod_deflate on Apache 2

    I'm using it on a couple small sites I maintain. The text portions of those sites get compressed to less than 50% of their original site. Obviously it does not compress images, pdfs,...
    Obviously there is no need to compress those as they are already properly prepared before they are available online.

  • by conner_bw ( 120497 ) * on Wednesday June 24, 2009 @10:57AM (#28452547) Journal

    Their video is dynamically building the SQL statement, which is full of injection possibilities.

    The first part of the statement is true, but the second (in regards to the video) is false. The variables used in the video are local and manually typed. They don't come from anywhere except the programmer's own mind. There is no injection possibility.

    Prepared statements are slower than regular queries. In MySQL, a prepared statement makes two round-trips to the server, which can slow down simple queries that are only executed a single time.

    So using prepared SQL everywhere is kind of a blanket statement; especially when it comes to speed. With that said, prepared statements can lead to a speed increase if you need to run the same query many times over an over. It also adds a level of security if you aren't pre-sanitizing your variables. But if the developer is in control of the query, and not repeating it, prepared statements are kind of wasteful.

  • by BZ ( 40346 ) on Wednesday June 24, 2009 @10:58AM (#28452563)

    > The price of downloading html and javascript source is peanuts compared to images and
    > flash animations

    That may or may not be true... Last I checked, a number of popular portal sites (things like included scripts totaling several hundred kilobytes as part of the page. The problem is that unlike images those scripts prevent the browser from doing certain things while the script is downloading (because you never know when that 200kb script you're waiting on will decide to do a document.write and compeletely change what you're supposed to do with all the HTML that follows it). So the cost of downloading scripts is _very_ palpable...

  • by JBL2 ( 994604 ) on Wednesday June 24, 2009 @11:20AM (#28452901)

    Yahoo! has a handy page ( []) with lots of good info. It includes YSlow (a Firefox add-on), a set of "Best Practices," and some good research. Also references a couple of O'Reilly books (which, to be fair, I haven't read).

    More specifically, CSS sprites (see []) and consolidating Javascript may be back (reducing HTTP requests), and a few other things that may surprise or inform.

  • Yslow vs. Speed (Score:3, Informative)

    by kbahey ( 102895 ) on Wednesday June 24, 2009 @01:09PM (#28454763) Homepage

    For those who are into web site performance, like me, the standard tool for everyone was Yslow [], which is a Firefox extension that measured front end (browser) page loading speed, assigned a score to your site/page and then gave a set of recommendations on improving the user experience.

    Now Google has the similar Page speed [] Firefox extension.

    However, when I tried it, with 5+ windows and 100+ tabs open, Firefox kept eating away memory, and then the laptop swapped and swapped and I had to kill Firefox, and go in its configuration files by hand and disable Page Speed. I have Yslow on the same configuration with no ill effects.

  • by Anonymous Coward on Wednesday June 24, 2009 @02:04PM (#28455837)

    It does.

    From Chapter 2.3.4. Garbage Collection in Orelly'S Programming PHP:

    PHP uses reference counting and copy-on-write to manage memory. Copy-on-write ensures that memory isn't wasted when you copy values between variables, and reference counting ensures that memory is returned to the operating system when it is no longer needed.

    To understand memory management in PHP, you must first understand the idea of a symbol table . There are two parts to a variable--its name (e.g., $name), and its value (e.g., "Fred"). A symbol table is an array that maps variable names to the positions of their values in memory.

    When you copy a value from one variable to another, PHP doesn't get more memory for a copy of the value. Instead, it updates the symbol table to say "both of these variables are names for the same chunk of memory." So the following code doesn't actually create a new array:

    $worker = array("Fred", 35, "Wilma");
    $other = $worker; // array isn't copied

    [... snip ...] []

"Even if you're on the right track, you'll get run over if you just sit there." -- Will Rogers