既に「Google I/O 2012で公開されたJavaScript高速化Tips集 | IDEA*IDEA」や「JavaScriptパフォーマンスを上げるシンプルな13の最適化 | Act as Professional – hiroki.jp by HIROCASTER」で紹介されて話題になっていたJavaScriptの高速化TIPSがhosikitiさんによって和訳されています。 リストでまとめられたリストを日本語で見たいという要望に見事に応えてくれていました! 1.コンストラクタ関数内ですべてのオブジェクトメンバを初期化する 2.常に同じ順番でオブジェクトメンバを初期化する 3.Numeric型(31bitで表現される符号付き整数)を出来るだけ使う 4.0から始まる連続した値を配列のキーとして使う 5.巨大な配列(64000個以上の要素を持つもの)は予め確保せず、必要になったら随時
1. はじめに、 今年も Google I/O が開催されました。一度も現地に行って参加したことはないのですが、毎年セッションの内容は技術的に高度なものばかりでいつも注目しています。今年の一つ興味深いセッションで、 「Google I/O 2012 - Breaking the JavaScript Speed Limit with V8 (Daniel Clifford)」 スライド ,ビデオ というのがありました。(ビデオ・資料をすぐ公開してもらえるのはホントありがたいです。) ご存じの通り V8 は Chrome に搭載されているばかっ速い JavaScript エンジンで Node.js でも採用されています。このセッションは、 V8 の内部実装の解説を元にどう JavaScript の実行速度がパフォーマンスチューニングができるかという内容で、もうこれは必見で見逃せないものです。
2012年 6月 13日 新しいサーバーでブログをリニューアルして気がついた、SNSボタンの有無でかなり読み込み速度に差がある。といっても2,3秒ほどですが、これは結構命取りだったりします。 まぁ私もそんなに詳しいわけではないので断言できませんが。 ・訪問者はその数秒でサイトから逃げる ・Googleはその数秒を評価基準に入れる たしか遅延ロード(Lazy Load)とかいう技術ですね。 わりとポピュラーなコードで何とかなったので書いときます。 ピュアなJavaScriptではなく、jQuery使いますね。 方法その1 時限式読み込み body閉じタグの前あたりに書きます。 . . . <div id="snsbox"></div> <script type="text/javascript"> var snscode = 'ここに、SNSのコードを書く' + '一行でつなげても良いが見に
Google MapのデザインをjQueryで変更する為のメモ書き。Google Map APIとjQueryでGoogle Mapの色合いを変更し、オリジナルのマーカーを付けてみます。こうする事で、既存デザインに合わせたGoogle Mapが出来ます。 今後必要になりそうだったので調べ物をしたついでにメモ書きです。デザインを変更、というと語弊がありますけど、好みの色に変えてみます。 ゴール↓ こんな感じのをjQueryでやろう、みたいな内容です。特に目新しい情報では無いですが。 なんかシャドウ変になっちゃった・・色やマーカーだけでもWebサイトで使用している色にあわせれば地図だけ浮いてしまうような事も無くなるんじゃないかなと思います。 ジオコーディングリクエスト<script type='text/javascript' src='http://ajax.googleapis.com/a
長い記事なので、先に結論だけ書いておきます。WebSocketのバイナリメッセージ機能は、これまでのインターネットのあり方をひっくり返します。「そんなの知ってるよ」という方もいるとは思います。僕も理屈では分かってたつもりだけど、実際にアプリを作ってみて、具体的にそれを感じることができたので、ちょっと長いですがどういうことなのか説明してみます。 WebSocketとは # WebSocketは、HTML5関連の中でも特に注目を集めている技術の一つです。通常のHTTP通信であればクライアントからのリクエストなしにサーバーは応答しませんが、WebSocketを使うことでクライアントとサーバーの間で双方向の通信が可能となります。これを利用することで、今後様々なリアルタイム性の高いサービスを構築することが可能になるでしょう。 そんなWebSocketですが、これまで波乱の道を歩んできました。数年前か
スクウェア・エニックス・ホールディングスは12月9日、米Googleと協力し、「家庭用ゲーム機向けと同等」のゲームをWebブラウザ上で提供していくと発表した。ブラウザ上でネイティブコードを実行する技術「Native Client」を活用、Chromeブラウザで動作するゲームの第1弾を月内にリリースし、来年中に複数のタイトルを公開するとしている。 米Google本社で開かれたNative Clientの発表会に、スク・エニの和田洋一社長が出席し、第1弾ゲーム「Mini Ninjas」を披露した。 同ゲームは2009年に英Eidos(スク・エニ子会社)がリリースした忍者アクションゲーム。12月中にオープンβサービスを開始する予定で、ダウンロードやインストールなどの操作をしなくてもChromeウェブストアから遊べるという。オープンβの利用には今後リリースされるChromeのβ版(Chrome 1
Google MAPS APIで遊んでいて、複数のgoogle.maps.Marker の、それぞれに吹き出し(openInfoWindow)をつけたかったのに、どれをクリックしても最後のマーカーから吹き出しが出てくる!というミスをしないための備忘録。質問しても「クロージャがわかってない奴は云々」とか説教垂れられるだけなので。。 V2 版はこちらです。 <script type="text/javascript" src="//maps.google.com/maps/api/js?sensor=false"></script> <div id="map" style="width: 740px; height: 400px;"></div> <script type="text/javascript"> function attachMessage(marker, msg) { goog
jGmaps | jQuery Plugins Googleマップを使った経路案内も一瞬で実装できるjQueryプラグイン「jGmaps」 必要なライブラリを読み込んで、次のようにjgmapsメソッドを呼び出すとGoogleマップによる経路案内の地図と文字による案内情報が出ます。 $('#mapa').jgmaps( { width: 300, height: 300, directions:{ address: ['東京都新宿区', '東京都港区'], usePanel: true, panelId: 'panelDirections' } } ); 次のように、経路が地図に表示されます。 文字による案内情報も表示できます。 会社案内や会場案内なんかもこれで速攻実装できそうですね。 ダウンロードできるサンプルをいじくってみましょう。 地名に日本の場所を漢字で使う場合、文字コードはUTF-
【2010/05/18追記】 AutoPagerizeやMinibuffer+LDRizeに依存せず、単体でページングやキー操作、プレビュー等が出来るスクリプトも作製しましたので、よろしければお試し下さい。 風柳亭: 【GIS_AutoPager】単独動作のGoogle画像検索AutoPagerスクリプト(Google Chrome/Firefox(Greasemonkey)/Opera用) GIS_AutoPager(version 0.02以降)をOperaやFirefoxで使う - 風柳メモ Greasemonkey版AutoPagerizeの本体はいじらずに、Google画像検索(Googleイメージ検索)に対応させるスクリプトを試作してみました。 LDRizeユーザは 【LDRize】Google 画像検索で画像をその場で見る拡張スクリプト とあわせてどうぞ。 【2010/01/
FirefoxやThunderbirdはWEBユーザーの必須アイテム。 初心者からヘビーユーザーまで使える!便利でクールなFirefox拡張機能(アドオン)の使い方やカスタマイズ、Mozilla関連情報をどうぞ。 Adobe 「Flash Player」を緊急アップデート。 by hoge (07/16) Adobe 「Flash Player」を緊急アップデート。 by H.I. (07/16) ウェブページから余計なコンテンツを排除して読みやすく表示できるFirefoxアドオン「Tranquility Reader」 by しんちゃん (07/11) YouTubeのHTML5動画に表示される広告をブロックしてくれるFirefoxアドオン「YouTube Advertisement Blocker」 by はち (06/17) ウェブページ上の不要なリンクを非表示にできるFirefox
To enable Web applications to maintain bidirectional communications with server-side processes, this specification introduces the WebSocket interface. 現行のJavaScript AjaxアプリケーションはXMLHttpRequestをサーバとの非同期通信メソッドとして使っている。ブラウザからサーバへのアクセスが基本であり、サーバからはリクエストへの返信という形でデータがやりとりされる。HTTP通信が基本であるため、リクエストを出すごとにHTTPのやりとりが実施される。 この状況を改善するためにW3Cで策定が進められている仕様のひとつにThe Web Sockets APIがある。Web Sockets APIはブラウザとサーバの双方向通信を
などという煽り気味なタイトルをついつけてしまいたくなる記事がGoogleCodeBlogに掲載されていました。 最初のほうはごく普通にJavaScriptを使ったRIAアプリケーションはどうしても起動が遅くなるため、それをどう減らすか、というテーマにそって書かれています。 方法として挙げられているのは、最初にすべてを読み込まず、モジュール単位で分割して遅延ローディングすること。ただし、それだけだと回線速度が遅く不安定なモバイル環境では問題が生じるためHTML5のキャッシュ機能を利用するといいとのこと。 遅延ローディングのためのさまざまな手法の得失や、例えばユーザーデータを読み込むときには動的ロードしない、というようにユーザーの操作を妨害しないよう留意することなどについても述べられていてそれだけでもノウハウとして十分に有意義なのですが、決め手として最後に出てくる方法がすごいです。 その方法と
Googleは米国時間11月5日、「Closure Tools」と呼ばれるプロジェクトをリリースし、同社のウェブサイトおよびウェブアプリケーション作成レベルに達することを望む開発者をサポートしていく方針を明らかにした。 Googleは、ウェブ中心のビジョンの一環で、JavaScriptを用いたウェブベースのプログラム記述を強く推進している。確かにGoogleは、「Gmail」や「Google Docs」などのサービスを通じて、JavaScriptを最大限に活用しており、より高速にJavaScriptプログラムを実行できるようにする目的もあって、「Chrome」ブラウザの開発に努めてきた。 しかしながら、JavaScriptプログラムは時に異なるブラウザ上では異なった動作をするなどの理由から、高機能なJavaScriptの記述、デバッグ、最適化は困難なものともなってきた。Googleがオープ
株式会社鳥人間 郷田まり子 2009/10/1 ついにプレビュー公開が始まった、リアルタイム&(ポーリングによる)擬似プッシュ型のコミュニケーションとコラボレーションのプラットフォーム「Google Wave」の特集です。その概要と「Gadget」「Embed」「Robot」という3つの拡張APIを使ったWaveの作り方を徹底解説します ついにプレビュー公開が始まった「Google Wave」とは 9月30日に、Google Apps アカウント所持者を対象にしたプレビュー公開が始まったGoogle Wave(以下、Wave)は、グーグルが世界に提案した、1つのコミュニケーション&コラボレーションプラットフォームです。 Waveを拡張することで、従来では実装が面倒であったプッシュ型の通信による複数ユーザー間での情報の同期を行うようなWebアプリケーションを開発できます。Waveについての詳
2009/05/28 「決してWebをあなどってはいけない」(Never underestimate the Web)。Google I/O 2009初日の基調講演でシュミットCEOに続いて登壇したのは、米グーグル バイス・プレジデントのビック・グンドトラ氏だ。ゆっくりと一語一語を区切りながら語り始めたグンドトラ氏の言葉には重みがある。彼は元マイクロソフト社員で、まさにWebをあなどっていた側にいたからだ。 グンドトラ氏はWindowsプラットフォームを唱道する立場にあった。彼に限らず、マイクロソフト社員の間には、ネイティブアプリケーションでなければできないことがあるとする見方が一般的だったという。「Keyholeという会社が出てきたとき、彼らが持つようなアプリケーションこそ、ネイティブでなければできないものだと言っていた。ところがグーグルは2004年11月にKeyholeを買収し、Goo
Google APIs Explorer Stay organized with collections Save and categorize content based on your preferences. The Google APIs Explorer is a tool available on most REST API reference documentation pages that lets you try Google API methods without writing code. The APIs Explorer acts on real data, so use caution when trying methods that create, modify, or delete data. For more details, read the APIs
「商業利用もOK! Google Mapsについて知りたいこと」に続くGoogle Mapsインタビューの後編は、数多く存在するGoogle Maps関連のAPIや機能のうち、あまり知られていないものや新しいものをグーグルのソフトウェアエンジニア、淺川浩紀さんに聞いた。 Code Playgroundでオンライン編集 まずは、即効性のあるものからいこう。 Googleが持つ多くのAPIは、Webブラウザ上からJavaScriptによって呼び出せる。JavaScriptはコンパイルの手順なしに書けば実行できるので手軽である。しかし、だからAPIを試すのも簡単だとは限らない。例えば、Google Maps APIなら正しいGoogle Maps APIキーを用意したり、適切な文書にプログラムを埋め込んだりする作業を行い、それをWebブラウザで開かねばならない。
「Greasemonkey」は「Firefox」のアドオンの一つで、Webページをより使いやすくするツールです。米lifehackerでは2年前に「Greasemonkey」スクリプトベスト10を発表しています。 当時、ライフハッカーとしては自信を持って紹介したのですが、この2年の間に新しいものがいくつか発表されたり、オリジナルのスクリプトが「Firefox 3」用に実装されたりしているので、今回はアップデート版を紹介しますね。 このベスト10は、ややGoogleユーザー寄りであるように感じるかもしれませんが、「Greasemonkey」とGoogleは同じタイプのJavaScriptを使っているので、ある意味予測された結果だといえます。なお、今回紹介しているスクリプトは、「Firefox」に「Greasemonkey」がインストールされた状態が最適な動作環境になっています。ただし、中には
リリース、障害情報などのサービスのお知らせ
最新の人気エントリーの配信
処理を実行中です
j次のブックマーク
k前のブックマーク
lあとで読む
eコメント一覧を開く
oページを開く