You signed in with another tab or window. Reload to refresh your session. You signed out in another tab or window. Reload to refresh your session. You switched accounts on another tab or window. Reload to refresh your session. Dismiss alert
すごい記事が1日目2日目で来ている中で恐縮ではありますが、フロントエンドJavaScriptでパフォーマンス点から気にしたほうがいい部分について書いてみることにします。 DOM律速になるケースもある よく「JavaScriptが遅い」ということも多いのですが、具体的にはどのあたりが遅くなってくるのでしょうか. 純粋にJavaScriptのスクリプト処理が遅い…最近はブラウザ自体も高速化しては来ましたが、それを追いかけるようにJavaScriptの巨大化も進んでいます。ただし、純粋にプログラム言語的な処理なら、Web Workerに振ることで並列化が可能です。 Ajaxや画像読み込みなどの通信が遅い…サーバ側で高速化する手もありますが、状況によってはJavaScriptで先読みを始めておいて、体感時間を短くすることも可能かもしれません。 DOM操作・表示が遅い…これについて今回考えてみます。
ReduxのGithubドキュメントを基に入門用記事として書いたものを、簡潔にまとめました。 もと記事はこちらです。 Redux入門 1日目 Reduxとは Redux入門 2日目 Reduxの基本・Actions Redux入門 3日目 Reduxの基本・Reducers Redux入門 4日目 Reduxの基本・Stores Redux入門 5日目 Reduxの基本・Data Flow Redux入門 6日目 ReduxとReactの連携 Reduxとは Reduxは、ReactJSが扱うUIのstate(状態)を管理をするためのフレームワークです。Reactではstateの管理するデータフローにFluxを提案していますが、ReduxはFluxの概念を拡張してより扱いやすく設計されています。 Reduxはstateを管理するためのライブラリーなので、React以外にもAngularJS
This is a note in reply to Victor Felder’s question who asked me what “Unsupported phi use of arguments” Crankshaft bailout means. What Crankshaft is trying to do is to completely avoid allocating arguments object when you write the code like this: function foo() { var sum = 0; for (var i = 0; i < arguments.length /* (1) */; i++) { sum += arguments[i]; /* (2) */ } } If one compiles this code naive
This is a note in reply to Kyle Simpson’s question Basics of object layout in V8 Each JavaScript object in V8 looks like this +-------+ | *---+-> hidden class (aka map) +-------+ | *---+-> out-of-object properties storage +-------+ | *---+-> elements storage +-------+ | 1 +-+ +-------+ | | 2 | | +-------+ > N slots reserved for in-object properties ~~~~~~~~~ | +-------+ | | N +-+ +-------+ There a
Long long ago, in a computer not that far away, there was a timeline, with many points on it. A young researcher tried to annotate all those points and struggled to place labels without overlaps. Placing them manually is the last thing he wanted to do. He spent a lot of time trying different methods without success, until he tapped into the force. Since then, whenever someone asks him how to place
メモがわり。 baseとなるURLを指定して相対URLを絶対URLに変換するには、ChromeやFireofxではURLUtilsを用いて以下のように書くことで簡単に実現できる。 var absolute = (new URL( "foo", "http://example.jp/bar/baz" ) ).href; // http://example.jp/bar/foo IEではURLコンストラクタはサポートされていないが、IE9以上ではDOMParserやcreateHTMLDocumentを使って現在のDOMとは分離したdocumentを生成し、その中に<base>要素を用いてbase URLを指定し、そのdocument内で<a>要素を用いて相対URLを絶対URLに変換するという手段によって相対URLを絶対URLに変換可能である。 function getAbsoluteUrl(
Unopinionated utilities for resizeable split views. Zero Deps Tiny: Each is between 1-2kb gzipped. Fast: No overhead or attached window event listeners, uses pure CSS for resizing. Unopinionated: Only compute view sizes. Everything else is up to you. Two utilities: Split.js - The original library, maintained since 2014, works with float and flex layouts. Supports all browsers. Split Grid - Success
Updated on 1/13/16: The ChakraCore GitHub repository is now open Today at JSConf US Last Call in Florida, we announced that we will open-source the core components of Chakra as ChakraCore, which will include all the key components of the JavaScript engine powering Microsoft Edge. The ChakraCore sources will be made available on GitHub under the MIT license next month. Gaurav Seth on stage at JSCon
Releases, Offers & More Be the first to hear about our newest content, best promotions and upcoming events. Plus get 25% off your next purchase. Newsletter Sign Up Download Accounts Your email address is your account identifier. You can create a password, or just download from the links sent via email. My Orders (Resend order emails) How We're Different Hands-on instructions Solutions to real-worl
JavaScript Advent Calendar 2015 4日目の記事です。フロントエンド人ではないですがフロントエンドが好きなので参加させていただきます。 グダグダと前置きが長いのでlovefieldにのみ興味がある人は最初の方を飛ばして「Indexed databaseをSQL風に書けるlovefieldを使ってみる」を見てください。 背景 iPhoneやAndroid端末が普及している現代ではWebページのスマートフォン対応が盛んに行われております。スマートフォン対応のWebページを作成するときはスマートフォンだからこそ意識しなければならない問題点がいくつかあると思います。そのうちの一つとして、スマートフォンは移動しながら使用するためPCと比べてネットワークが不安定です。そのためWebページが表示されないなどの問題が発生します。トンネルなどを通過する際によく発生する問題かと思い
FirefoxのJavaScript実行エンジンであるSpiderMonkeyでは、ECMAScriptの仕様にはないSpiderMonkey固有の拡張機能をいくつか利用できますが、その中の1つとして__noSuchMethod__があります。 これはRubyなどでいう「メソッドミッシング」を実現するための仕組みで、あるオブジェクトに__noSuchMethod__という名前のメソッドを定義しておくと、呼び出されたメソッドが存在しなかった時に代わりに__noSuchMethod__メソッドが呼ばれるというものです。 具体的には以下のように使います。 // インスタンスに直接定義する場合 var object = {}; object.__noSuchMethod__ = function(name, args) { alert('NO SUCH METHOD: '+name+' , '+J
Pinia is now the new default The official state management library for Vue has changed to Pinia. Pinia has almost the exact same or enhanced API as Vuex 5, described in Vuex 5 RFC. You could simply consider Pinia as Vuex 5 with a different name. Pinia also works with Vue 2.x as well. Vuex 3 and 4 will still be maintained. However, it's unlikely to add new functionalities to it. Vuex and Pinia can
概要 先日とある案件でVue.jsを用いたアプリケーションを開発することとなりました。 一般に同種のフレームワークと比較してVue.jsは、学習コストが低く気軽にはじめやすいということがメリットとして語られています。 ただ、今回の案件のようにMVC系フレームワークを用いて開発する際にネックとなっていたのが、コンポーネント間のデータ共有についての最適解が見つけられていないと感じていたことでした。 もちろん、適切にモデルを設計すればコンポーネント間のやり取りに責任を持つ、親コンポーネントとでもいうべき層を実装することでこの問題は解決できると思います。 しかし実案件では往々にして親コンポーネント層の実装が個々人の裁量に陥りやすく、結果的にコンポーネント間データ共有の方式が統一出来ていないケースも出てきてしまいました。 コンポーネント間で共有したいデータ=アプリケーションの本質となるデータは、もっ
When ESNext (i.e. ES6+) files are used natively, you gain these benefits: It is much easier for debugging as your are debugging your source code, not compiled code Can be faster due to: Polyfills having to work around native features by going the long way, which can be very slow (e.g. () => {} vs function () {}.bind(this) JavaScript engines are better able to optimise your code due to the source c
この3~4年間でJavaScriptとかWebクライアントサイドを取り巻く温度感も大きく変わった。これからはHTML5だぜイエーイと騒いでいたのも随分過去の話になったように思う。だけど、このあたりの温度感はそんなに掴みやすいものでは無い。別に放っておいてもいいんだけど、放っておくと10年20年経たないと誰も書かなんてのも割とよくある話。でも、そこまで待ちたくは無い。なにとなしに説明してみようと思う。 だいたい2011~13年ぐらいはHTML5がバブルっていた。今からすると「バブルだった」というのが一番説明しやすい。Node.jsあたりが世の中に認知を拡大していたのもこの時期だし、スマートフォンのシェアの伸びに合わせて、クロスプラットフォームで出せるWebにみんな夢を見ていた。MVCだの設計だの何だの言い出したのも、だいたいこのくらいの時期だし、Single Page Application
リリース、障害情報などのサービスのお知らせ
最新の人気エントリーの配信
処理を実行中です
j次のブックマーク
k前のブックマーク
lあとで読む
eコメント一覧を開く
oページを開く